Skip to content

Commit

Permalink
Copy the latest project tag to the image
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyates committed Nov 3, 2023
1 parent 68e7281 commit 66c187f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get the latest tag
run: |
echo "GIT_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_ENV
- name: Build Image
# https://github.com/marketplace/actions/buildah-build
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: latest ${{ github.sha }}
tags: latest ${{ github.sha }} ${{ env.GIT_TAG }}
extra-args: |
--ignorefile ./container/.containerignore
containerfiles: |
Expand Down

0 comments on commit 66c187f

Please sign in to comment.