Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Add build container image as a job in release wf #839

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .github/workflows/build-images-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ on:
- "release-*"
tags:
- "v*"
workflow_run:
workflows:
- "Create Release"
types:
- completed

jobs:
set_ref:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,17 @@ jobs:
files: out/*
body_path: ${{ env.RELEASE_TAG }}.md
tag_name: ${{ env.RELEASE_TAG }}

build_ipam:
needs: push_release_tags
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.push_release_tags.outputs.release_tag }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ref: ${{ needs.push_release_tags.outputs.release_tag }}
ref: ${{ env.RELEASE_TAG }}

We can also use env.RELEASE_TAG here right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. The release job isn't configured to run before build_ipam. They could be running in parallel, or in any order. Only the push_release_tag is guaranteed to run first. Also, I'm not sure if the env is maintained between the jobs.

Is there any reason for using env instead of outputs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no reason it just looked simpler.

secrets:
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
Loading