Skip to content

Commit ccafa8b

Browse files
committed
ci(pipeline): enhance build conditions for release workflow
- Allows builds to proceed if forced through an input flag. - Restricts release job execution to the main branch only, ensuring controlled releases.
1 parent 802d339 commit ccafa8b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/pipeline.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ jobs:
108108
- name: evaluate - build_push
109109
id: evaluate_build_push
110110
run: |
111-
if [ "${{ steps.pathsFilter.outputs.src }}" = "true" ]; then
111+
if [ "${{ steps.pathsFilter.outputs.src }}" = "true" ] || \
112+
[ "${{ github.event.inputs.force_build }}" = "true" ]; then
112113
result=true
113114
else
114115
result=false
@@ -258,7 +259,7 @@ jobs:
258259

259260
release:
260261
name: release
261-
if: ${{ needs.discovery.outputs.release == 'true' }}
262+
if: ${{ needs.discovery.outputs.release == 'true' && github.ref == 'refs/heads/main' }}
262263
needs: [discovery, build]
263264
runs-on: ubuntu-latest
264265
env:

0 commit comments

Comments
 (0)