|
9 | 9 | - 'epic/**' |
10 | 10 | pull_request: |
11 | 11 | branches: |
12 | | - - 'epic/**' |
| 12 | + - 'staging' |
13 | 13 | types: [ closed ] |
| 14 | + workflow_dispatch: |
| 15 | + inputs: |
| 16 | + force_snapshot_lib: |
| 17 | + description: 'Force snapshot-lib to run' |
| 18 | + required: false |
| 19 | + type: boolean |
| 20 | + default: false |
| 21 | + force_snapshot_compose_lib: |
| 22 | + description: 'Force snapshot-compose-lib to run' |
| 23 | + required: false |
| 24 | + type: boolean |
| 25 | + default: false |
14 | 26 |
|
15 | 27 | jobs: |
16 | 28 | detect-changes: |
@@ -108,13 +120,14 @@ jobs: |
108 | 120 | # This job must explicitly depend on build_test and detect-changes |
109 | 121 | needs: [build_test, detect-changes] |
110 | 122 | # Run for direct commits to epic branches OR when PRs are merged into epic branches |
111 | | - # AND only when build_test succeeds AND lib has changed |
| 123 | + # AND only when build_test succeeds AND lib has changed OR manually triggered with force_snapshot_lib |
112 | 124 | if: > |
113 | 125 | success() && |
114 | | - needs.detect-changes.outputs.lib-changed == 'true' && |
115 | | - ((github.event_name == 'push' && startsWith(github.ref, 'refs/heads/epic/')) || |
116 | | - (github.event_name == 'pull_request' && github.event.action == 'closed' && |
117 | | - github.event.pull_request.merged == true && startsWith(github.base_ref, 'staging'))) |
| 126 | + ((github.event_name == 'workflow_dispatch' && github.event.inputs.force_snapshot_lib == 'true') || |
| 127 | + (needs.detect-changes.outputs.lib-changed == 'true' && |
| 128 | + ((github.event_name == 'push' && startsWith(github.ref, 'refs/heads/epic/')) || |
| 129 | + (github.event_name == 'pull_request' && github.event.action == 'closed' && |
| 130 | + github.event.pull_request.merged == true && startsWith(github.base_ref, 'staging'))))) |
118 | 131 | runs-on: ubuntu-latest |
119 | 132 | steps: |
120 | 133 | - name: Checkout code |
@@ -155,13 +168,14 @@ jobs: |
155 | 168 | # This job must explicitly depend on build_test and detect-changes |
156 | 169 | needs: [build_test, detect-changes] |
157 | 170 | # Run for direct commits to epic branches OR when PRs are merged into epic branches |
158 | | - # AND only when build_test succeeds AND lib-compose has changed |
| 171 | + # AND only when build_test succeeds AND lib-compose has changed OR manually triggered with force_snapshot_compose_lib |
159 | 172 | if: > |
160 | 173 | success() && |
161 | | - needs.detect-changes.outputs.lib-compose-changed == 'true' && |
162 | | - ((github.event_name == 'push' && startsWith(github.ref, 'refs/heads/epic/')) || |
163 | | - (github.event_name == 'pull_request' && github.event.action == 'closed' && |
164 | | - github.event.pull_request.merged == true && startsWith(github.base_ref, 'staging'))) |
| 174 | + ((github.event_name == 'workflow_dispatch' && github.event.inputs.force_snapshot_compose_lib == 'true') || |
| 175 | + (needs.detect-changes.outputs.lib-compose-changed == 'true' && |
| 176 | + ((github.event_name == 'push' && startsWith(github.ref, 'refs/heads/epic/')) || |
| 177 | + (github.event_name == 'pull_request' && github.event.action == 'closed' && |
| 178 | + github.event.pull_request.merged == true && startsWith(github.base_ref, 'staging'))))) |
165 | 179 | runs-on: ubuntu-latest |
166 | 180 | steps: |
167 | 181 | - name: Checkout code |
|
0 commit comments