Skip to content

Commit

Permalink
Add proper version tagging for container image build
Browse files Browse the repository at this point in the history
  • Loading branch information
antarcticrainforest committed Mar 15, 2024
1 parent 5da4a7c commit 6c45387
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ run-name: ${{ github.actor }} is building the container
"on":
workflow_dispatch:
push:
branches:
- main
tags:
- "v*.*.*"

jobs:
build-and-push-image:
Expand All @@ -25,6 +25,11 @@ jobs:
id: repository
run: |
echo "repo=$(echo ${{ github.repository }}|tr 'A-Z' 'a-z')" >> $GITHUB_OUTPUT
echo "tag=$(python src/databrowser/__init__.py)" >> $GITHUB_OUTPUT
-
name: Set docker version label
run: sed -i 's/<VERSION>/${{ steps.repository.outputs.tag }}/g' Dockerfile

-
name: Set up QEMU
Expand All @@ -49,4 +54,5 @@ jobs:
platforms: linux/amd64
push: true
tags: |
ghcr.io/${{ steps.repository.outputs.repo }}:${{ steps.repository.outputs.tag }}
ghcr.io/${{ steps.repository.outputs.repo }}:latest

0 comments on commit 6c45387

Please sign in to comment.