File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1717 required : false
1818 type : boolean
1919 default : false
20+ push :
21+ description : ' Push image to registry (makes it push if it usually wouldnt)'
22+ required : false
23+ type : boolean
24+ default : false
2025 workflow_dispatch :
2126
2227name : ci-build
2328
2429env :
2530 REGISTRY : ghcr.io
2631 DOTNET_VERSION : 9.0.x
32+
33+ PUSH : ${{ inputs.push || (github.ref_protected && github.event_name != 'pull_request') }}
2734
2835jobs :
2936
@@ -84,15 +91,15 @@ jobs:
8491 uses : ./.github/actions/build-app
8592 with :
8693 dockerfile : ${{ matrix.dockerfile }}
87- push : ${{ github.ref_protected && github.event_name != 'pull_request' }}
94+ push : ${{ env.PUSH }}
8895 image : ${{ matrix.image }}
8996 platforms : ${{ inputs.platforms || 'linux/amd64' }}
9097
9198 promote-image :
9299 name : Promote Image (${{ matrix.image }})
93100 needs : [build, tests]
94101 runs-on : ubuntu-latest
95- if : ${{ github.ref_protected && github.event_name != 'pull_request' }}
102+ if : ${{ env.PUSH }}
96103 strategy :
97104 fail-fast : false
98105 matrix :
Original file line number Diff line number Diff line change 3333 uses : ./.github/workflows/ci-build.yml
3434 with :
3535 platforms : linux/amd64,linux/arm64
36- latest : ${{ needs.get-latest-tag.outputs.latest-tag == github.ref_name }}
36+ latest : ${{ needs.get-latest-tag.outputs.latest-tag == github.ref_name }}
37+ push : true
You can’t perform that action at this time.
0 commit comments