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 another tag for containers when pushing to quay with the latest commit sha #67

Merged
merged 2 commits into from
Jan 14, 2025
Merged
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
12 changes: 8 additions & 4 deletions .github/workflows/build-push-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:
runs-on: ubuntu-latest
env:
REGISTRY: quay.io
# Set tag 'latest' on main branch
REGISTRY_TAG: ${{ (github.head_ref||github.ref_name)=='main' && 'latest' || (github.head_ref||github.ref_name) }}
# Set tag to the last commit sha on main branch, otherwise tag will be the branch name
REGISTRY_TAG: ${{ (github.head_ref||github.ref_name)=='main' && github.sha || (github.head_ref||github.ref_name) }}

REGISTRY_ORG: kubev2v
steps:
- name: Checkout forklift
Expand All @@ -28,5 +29,8 @@ jobs:
- name: Build and push images to quay.io
run: |
cd ${GITHUB_WORKSPACE}
podman build . -f Containerfile -t quay.io/kubev2v/migration-planner-ui
podman push quay.io/kubev2v/migration-planner-ui
podman build . -f Containerfile -t $REGISTRY/kubev2v/migration-planner-ui
podman build . -f Containerfile --label "quay.expires-after=10d" -t $REGISTRY/kubev2v/migration-planner-ui:$REGISTRY_TAG

podman push $REGISTRY/kubev2v/migration-planner-ui
podman push $REGISTRY/kubev2v/migration-planner-ui:$REGISTRY_TAG
Loading