From 5934799397b1baa2b2fddf76944aa8e54a6643bb Mon Sep 17 00:00:00 2001 From: Sietse Snel Date: Thu, 29 Feb 2024 14:32:49 +0100 Subject: [PATCH] CI: update image build logic - Change development image tag to "development" so that branch name and tag name are the same (and we don't need any logic to translate between branch names and tag names) - Also build images for release-1.9 branch --- .github/workflows/build-push-image.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-push-image.yml b/.github/workflows/build-push-image.yml index cbb4e71..aefe0cc 100644 --- a/.github/workflows/build-push-image.yml +++ b/.github/workflows/build-push-image.yml @@ -5,6 +5,7 @@ on: push: branches: - 'development' + - 'release-1.9' jobs: push-image: @@ -14,6 +15,11 @@ jobs: contents: read packages: write steps: + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + - name: Check out Yoda repository uses: actions/checkout@v3 with: @@ -39,4 +45,4 @@ jobs: context: yoda/docker/images/yoda_public file: yoda/docker/images/yoda_public/Dockerfile push: true - tags: ghcr.io/utrechtuniversity/yoda-public:dev-1.9 + tags: ghcr.io/utrechtuniversity/yoda-public:${{ steps.extract_branch.outputs.branch }}