Skip to content

Commit

Permalink
ci: Skip CI when syncing develop<>master (getsentry#7021)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea authored Feb 2, 2023
1 parent c3dd355 commit be6a8a1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- develop
- master
- release/**
pull_request:
workflow_dispatch:
Expand Down Expand Up @@ -136,6 +137,10 @@ jobs:
# Note: These next three have to be checked as strings ('true'/'false')!
is_develop: ${{ github.ref == 'refs/heads/develop' }}
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
is_gitflow_sync: |
github.event_name == 'pull_request' &&
(github.head_ref == 'refs/heads/develop' || github.head_ref == 'refs/heads/master') &&
contains(steps.pr-labels.outputs.labels, ' Dev: Gitflow ')
force_skip_cache:
${{ github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' ci-skip-cache ') }}

Expand All @@ -144,7 +149,9 @@ jobs:
needs: job_get_metadata
runs-on: ubuntu-20.04
timeout-minutes: 15
if: needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request'
if: |
needs.job_get_metadata.outputs.is_gitflow_sync == 'false' &&
(needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request')
steps:
- name: 'Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})'
uses: actions/checkout@v3
Expand Down

0 comments on commit be6a8a1

Please sign in to comment.