File tree Expand file tree Collapse file tree 1 file changed +25
-3
lines changed
Expand file tree Collapse file tree 1 file changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,40 @@ permissions:
66on :
77 push :
88 branches :
9- - ' main'
10- - ' release-*'
9+ - " main"
10+ - " release-*"
1111 tags :
12- - ' v*'
12+ - " v*"
13+ workflow_run :
14+ workflows :
15+ - " Create Release"
16+ types :
17+ - completed
1318
1419jobs :
20+ set_ref :
21+ runs-on : ubuntu-latest
22+ outputs :
23+ github_ref : ${{ steps.set_ref.outputs.github_ref }}
24+ steps :
25+ - name : Set ref
26+ id : set_ref
27+ run : |
28+ if [[ "${{ github.event_name }}" == "workflow_run" ]] && [[ -n "${{ needs.create-release.outputs.release_tag }}" ]]; then
29+ echo "GITHUB_REF=refs/heads/${{ needs.create-release.outputs.release_tag }}" >> "${GITHUB_OUTPUT}"
30+ else
31+ echo "GITHUB_REF=${{ github.ref }}" >> "${GITHUB_OUTPUT}"
32+ fi
33+
1534 build_ipam :
35+ needs : set_ref
1636 name : Build IPAM container image
37+ if : github.repository == 'metal3-io/ip-address-manager'
1738 uses : metal3-io/project-infra/.github/workflows/container-image-build.yml@main
1839 with :
1940 image-name : " ip-address-manager"
2041 pushImage : true
42+ ref : ${{ needs.set_ref.outputs.github_ref }}
2143 secrets :
2244 QUAY_USERNAME : ${{ secrets.QUAY_USERNAME }}
2345 QUAY_PASSWORD : ${{ secrets.QUAY_PASSWORD }}
You can’t perform that action at this time.
0 commit comments