Sha256: 2f047b14414094dfaf04582a5a5467466d9759c4cf937a7f26474b1dc61e88cb

Contents?: true

Size: 1.98 KB

Versions: 1

Compression:

Stored size: 1.98 KB

Contents

name: Test
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  GITLEAKS_REF: f15b4e408b12fda7e2833f8a32c0d8a045bd48a0

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        ruby: [2.6, 2.7, 3.0]
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true
    - run: bundle exec rake
  pronto:
    if: github.EVENT_NAME == 'pull_request'
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - uses: HeRoMo/pronto-action@v1.13.0
      with:
        github_token: ${{ secrets.GITHUB_TOKEN }}
  gitleaks:
    if: github.EVENT_NAME == 'pull_request'
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 0
    - run: |
        curl -H "Accept: application/vnd.github.v3.raw" \
          -L "https://api.github.com/repos/zricethezav/gitleaks/contents/config/gitleaks.toml?ref=${{ env.GITLEAKS_REF }}" \
          >> ${{ github.WORKSPACE }}/.github/workflows/original.toml
        sed "/\[allowlist\]/,/^$/d" ${{ github.WORKSPACE }}/.github/workflows/original.toml >> ${{ github.WORKSPACE }}/.github/workflows/official.toml
        cat .github/workflows/gitleaks.toml >> .github/workflows/official.toml
        if [[ ${{ github.REF }} == 'refs/heads/main' ]]; then
          CURRENT_COMMIT="${{ github.SHA }}"
        else
          CURRENT_COMMIT="${{ github.EVENT.PULL_REQUEST.HEAD.SHA }}"
        fi
        echo "LOG_OPTS='^origin/main $CURRENT_COMMIT'" >> $GITHUB_ENV
    - name: GitLeaks
      uses: addnab/docker-run-action@v3
      with:
        image: zricethezav/gitleaks:v8.0.4
        options: -v ${{ github.WORKSPACE }}:/app
        run: |
          cd /app
          gitleaks detect --verbose --source='./' \
            --config='.github/workflows/official.toml' \
            --log-opts=${{ env.LOG_OPTS }}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ninny-0.1.19 .github/workflows/test.yml