Skip to content

Commit

Permalink
fix: Add DEF_TAG_NAME to env in release-heat-rxt.yml to fix empty ima…
Browse files Browse the repository at this point in the history
…geTag issue (#542)
  • Loading branch information
sowm9802 authored Nov 8, 2024
1 parent ba4c8cc commit c4fa356
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/release-heat-rxt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
DEF_TAG_NAME: 2024.1-ubuntu_jammy

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
Expand All @@ -42,6 +43,10 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# ghcr only allows lowercase repository names
- name: lowercase repo name
run: |
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
Expand All @@ -60,8 +65,8 @@ jobs:
file: Containerfiles/HeatRXT-Containerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/heat-rxt:${{ github.event.inputs.imageTag }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/heat-rxt:${{ github.event.inputs.imageTag }}-${{ env.MY_DATE }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/heat-rxt:${{ github.event.inputs.imageTag || env.DEF_TAG_NAME }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/heat-rxt:${{ github.event.inputs.imageTag || env.DEF_TAG_NAME }}-${{ env.MY_DATE }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.event.inputs.imageTag }}
VERSION=${{ github.event.inputs.imageTag || env.DEF_TAG_NAME }}

0 comments on commit c4fa356

Please sign in to comment.