Skip to content

Commit

Permalink
CI: update image build logic
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
stsnel committed Mar 4, 2024
1 parent bc7de8e commit 9d5ee50
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- 'development'
- 'release-1.9'

jobs:
push-image:
Expand All @@ -14,12 +15,18 @@ 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:
path: yoda
repository: UtrechtUniversity/yoda
ref: development
ref: ${{ steps.extract_branch.outputs.branch }}

- name: Authenticate to the container registry
uses: docker/login-action@v2
Expand All @@ -34,4 +41,6 @@ jobs:
context: yoda/docker/images/yoda_web_mock
file: yoda/docker/images/yoda_web_mock/Dockerfile
push: true
tags: ghcr.io/utrechtuniversity/yoda-web-mock:dev-1.9
tags: ghcr.io/utrechtuniversity/yoda-web-mock:${{ steps.extract_branch.outputs.branch }}
build-args: |
TAG=${{ steps.extract_branch.outputs.branch }}

0 comments on commit 9d5ee50

Please sign in to comment.