Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

allow tags for releases #6

Merged
merged 1 commit into from
May 8, 2024
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
11 changes: 10 additions & 1 deletion .github/actions/build-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ runs:
${{ inputs.namespace }}/${{ inputs.final_image }}:test
# cache-from: type=gha,scope=build-${{ env.PLATFORM_PAIR }}
# cache-to: type=gha,scope=build-${{ env.PLATFORM_PAIR }}

- name: Select image tag based on event
shell: bash
run:
if [[ "${{ github.event_name }}" == 'release' ]]; then
echo "IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
else
echo "IMAGE_TAG=latest" >> $GITHUB_ENV
fi

- name: Push the built image to ghcr.io
id: push-final
Expand All @@ -56,7 +65,7 @@ runs:
provenance: false
file: ${{ github.workspace }}/Containerfile
tags: |
ghcr.io/${{ inputs.namespace }}/${{ inputs.final_image }}:latest
ghcr.io/${{ inputs.namespace }}/${{ inputs.final_image }}:${{ env.IMAGE_TAG }}
push: true

# this step is ONLY needed for maintainence of self hosted runners
Expand Down