Skip to content

Commit

Permalink
fix: refactor image tag name and build version opt
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeRepko committed Aug 7, 2024
1 parent 88bde7e commit 0c9b8e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/release-gnocchi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,26 @@ on:
imageTag:
description: 'Set tag for the image'
required: true
default: '2024.1-ubuntu_jammy'
type: choice
options:
- 2024.1-ubuntu_jammy
buildVersion:
description: 'Set version to build'
required: true
default: '4.6.2'
type: choice
options:
- 4.6.2
- stable/4.6
- master

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
PUSH_VERSION: 4.6.2
DEF_TAG_NAME: 2024.1-ubuntu_jammy
DEF_BUILD_VERSION: 4.6.2

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
Expand Down Expand Up @@ -64,8 +74,8 @@ jobs:
file: Containerfiles/GnocchiRXT-Containerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/gnocchi:${{ github.event.inputs.imageTag || env.PUSH_VERSION }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/gnocchi:${{ github.event.inputs.imageTag || env.PUSH_VERSION }}-${{ env.MY_DATE }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/gnocchi:${{ github.event.inputs.imageTag || env.DEF_TAG_NAME }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/gnocchi:${{ github.event.inputs.imageTag || env.DEF_TAG_NAME }}-${{ env.MY_DATE }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.event.inputs.imageTag || env.PUSH_VERSION}}
VERSION=${{ github.event.inputs.buildVersion || env.DEF_BUILD_VERSION}}
1 change: 0 additions & 1 deletion Containerfiles/GnocchiRXT-Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ubuntu:22.04
ARG VERSION=4.6.2
ENV GNOCCHI_VERSION ${VERSION:-master}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
Expand Down

0 comments on commit 0c9b8e5

Please sign in to comment.