Prevent PR jobs from running in the main branch #276
@ -23,7 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
ref: ${{ github.head_ref }} # Checkout the actual branch, not the result if merged into the base
|
ref: ${{ github.head_ref }} # Checkout the actual branch, not the result if merged into the base
|
||||||
- uses: ruby/setup-ruby@v1.220.0
|
- uses: ruby/setup-ruby@v1
|
||||||
- run: bundle install
|
- run: bundle install
|
||||||
- &postgres_wait
|
- &postgres_wait
|
||||||
name: Wait until Postgres is ready to accept connections
|
name: Wait until Postgres is ready to accept connections
|
||||||
@ -65,26 +65,29 @@ jobs:
|
|||||||
if: failure()
|
if: failure()
|
||||||
run: docker ps --filter network=$JOB_CONTAINER_NAME-$GITHUB_JOB-network --filter name=$JOB_CONTAINER_NAME-* --format "{{.ID}}" | xargs docker rm -f
|
run: docker ps --filter network=$JOB_CONTAINER_NAME-$GITHUB_JOB-network --filter name=$JOB_CONTAINER_NAME-* --format "{{.ID}}" | xargs docker rm -f
|
||||||
rubocop:
|
rubocop:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: ruby/setup-ruby@v1.220.0
|
- uses: ruby/setup-ruby@v1
|
||||||
- run: bundle install
|
- run: bundle install
|
||||||
- run: bundle exec rubocop --force-exclusion --parallel
|
- run: bundle exec rubocop --force-exclusion --parallel
|
||||||
check-licenses:
|
check-licenses:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- uses: ruby/setup-ruby@v1.220.0
|
- uses: ruby/setup-ruby@v1
|
||||||
- name: Install project dependencies
|
- name: Install project dependencies
|
||||||
run: bundle install --jobs `getconf _NPROCESSORS_ONLN`
|
run: bundle install --jobs `getconf _NPROCESSORS_ONLN`
|
||||||
- name: Run license finder
|
- name: Run license finder
|
||||||
run: license_finder
|
run: license_finder
|
||||||
copyright_notice:
|
copyright_notice:
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user