aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-08-19 02:33:07 +0100
committerGravatar Joe Banks <[email protected]>2024-08-19 02:33:07 +0100
commit5178b8f06656d903f3ad59abb39411fde8fb46a4 (patch)
tree1afbd48817cacc6b661ab3a515e8922f718efe31 /.github
parentAdd style-src self & Google Fonts (diff)
Inject semver in Docker Build Stage
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-deploy.yaml22
1 files changed, 14 insertions, 8 deletions
diff --git a/.github/workflows/build-deploy.yaml b/.github/workflows/build-deploy.yaml
index cc4c7b5..2387024 100644
--- a/.github/workflows/build-deploy.yaml
+++ b/.github/workflows/build-deploy.yaml
@@ -6,14 +6,14 @@ on:
required: true
type: string
project:
- description: "The project to build and push"
- required: true
- type: string
+ description: "The project to build and push"
+ required: true
+ type: string
dockerfile:
- description: "The Dockerfile to use for the build"
- required: false
- type: string
- default: "Dockerfile"
+ description: "The Dockerfile to use for the build"
+ required: false
+ type: string
+ default: "Dockerfile"
jobs:
build:
@@ -34,6 +34,11 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ github.token }}
+ - name: Fetch project version (Backend)
+ if: ${{ inputs.project == 'backend' }}
+ run: >-
+ echo "THALLIUM_SEMVER=$(poetry version -s)" >> $GITHUB_ENV
+
# Build and push the container to the GitHub Container
# Repository. The container will be tagged as "latest"
# and with the short SHA of the commit.
@@ -50,6 +55,7 @@ jobs:
ghcr.io/owl-corp/thallium-${{ inputs.project }}:${{ inputs.sha-tag }}
build-args: |
git_sha=${{ github.sha }}
+ thallium_semver=${{ env.THALLIUM_SEMVER || '' }}
deploy:
name: Deploy
@@ -77,4 +83,4 @@ jobs:
namespace: merch
manifests: |
infra/kubernetes/namespaces/merch/deployment.yaml
- images: 'ghcr.io/owl-corp/thallium-${{ inputs.project }}:${{ inputs.sha-tag }}'
+ images: "ghcr.io/owl-corp/thallium-${{ inputs.project }}:${{ inputs.sha-tag }}"