Skip to content

Commit be6a8a1

Browse files
authored
ci: Skip CI when syncing develop<>master (#7021)
1 parent c3dd355 commit be6a8a1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- develop
6+
- master
67
- release/**
78
pull_request:
89
workflow_dispatch:
@@ -136,6 +137,10 @@ jobs:
136137
# Note: These next three have to be checked as strings ('true'/'false')!
137138
is_develop: ${{ github.ref == 'refs/heads/develop' }}
138139
is_release: ${{ startsWith(github.ref, 'refs/heads/release/') }}
140+
is_gitflow_sync: |
141+
github.event_name == 'pull_request' &&
142+
(github.head_ref == 'refs/heads/develop' || github.head_ref == 'refs/heads/master') &&
143+
contains(steps.pr-labels.outputs.labels, ' Dev: Gitflow ')
139144
force_skip_cache:
140145
${{ github.event_name == 'pull_request' && contains(steps.pr-labels.outputs.labels, ' ci-skip-cache ') }}
141146

@@ -144,7 +149,9 @@ jobs:
144149
needs: job_get_metadata
145150
runs-on: ubuntu-20.04
146151
timeout-minutes: 15
147-
if: needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request'
152+
if: |
153+
needs.job_get_metadata.outputs.is_gitflow_sync == 'false' &&
154+
(needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request')
148155
steps:
149156
- name: 'Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})'
150157
uses: actions/checkout@v3

0 commit comments

Comments
 (0)