From f867497ebe26d8440bf37894f4e30a201850c63e Mon Sep 17 00:00:00 2001 From: Caterina <36919673+catttam@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:48:54 +0200 Subject: [PATCH] Update docker-image.yml --- .github/workflows/docker-image.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 8efa9ba..90cd1ec 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,7 +2,9 @@ name: Docker Image CI on: push: - branches: [ "main" ] + branches: + - main + - devel jobs: @@ -20,5 +22,9 @@ jobs: - name: Build the Docker image run: | GHCR_IMAGE=ghcr.io/grycap/oscar-metrics - - docker build . --file Dockerfile --output "type=image,push=true" --tag ${GHCR_IMAGE}:latest + if [[ $GITHUB_REF == refs/heads/devel ]]; then + TAGS="--tag ${GHCR_IMAGE}:devel" + else + TAGS="${GHCR_IMAGE}:latest" + fi + docker build . --file Dockerfile --output "type=image,push=true" ${TAGS}