Skip to content

Commit

Permalink
Merge pull request #816 from Nordix/mquhuy/backport-container-build-i…
Browse files Browse the repository at this point in the history
…mage-wf-1.7

🌱 Backport container build image wf to release-1.7
  • Loading branch information
metal3-io-bot authored Dec 20, 2024
2 parents 1c28946 + ef23b33 commit 6a84044
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/build-images-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,40 @@ permissions:
on:
push:
branches:
- 'main'
- 'release-*'
- "main"
- "release-*"
tags:
- 'v*'
- "v*"
workflow_run:
workflows:
- "Create Release"
types:
- completed

jobs:
set_ref:
runs-on: ubuntu-latest
outputs:
github_ref: ${{ steps.set_ref.outputs.github_ref }}
steps:
- name: Set ref
id: set_ref
run: |
if [[ "${{ github.event_name }}" == "workflow_run" ]] && [[ -n "${{ needs.create-release.outputs.release_tag }}" ]]; then
echo "GITHUB_REF=refs/heads/${{ needs.create-release.outputs.release_tag }}" >> "${GITHUB_OUTPUT}"
else
echo "GITHUB_REF=${{ github.ref }}" >> "${GITHUB_OUTPUT}"
fi
build_ipam:
needs: set_ref
name: Build IPAM container image
if: github.repository == 'metal3-io/ip-address-manager'
uses: metal3-io/project-infra/.github/workflows/container-image-build.yml@main
with:
image-name: "ip-address-manager"
pushImage: true
ref: ${{ needs.set_ref.outputs.github_ref }}
secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
Expand Down

0 comments on commit 6a84044

Please sign in to comment.