From fc01cc22d910b8cafdd6bb512f46281e33134224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Rodri=CC=81guez?= Date: Wed, 8 Mar 2023 10:13:56 +0100 Subject: [PATCH] Tag images on push tag event --- .github/workflows/docker-images.yml | 10 +++++----- .space.kts | 1 - Dockerfile | 3 +-- DockerfileSpace | 3 +-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 3ce9ee0..f0bd8c1 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -50,11 +50,11 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr - type=semver,pattern=v{{version}} - type=semver,pattern=v{{major}}.{{minor}} - type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} - type=raw,,value={{branch}}-{{sha}} + type=ref,event=tag + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value={{branch}}-{{sha}},enabled=${{ !startsWith(github.ref, 'refs/tags/') }} - name: Build image uses: docker/build-push-action@v3 diff --git a/.space.kts b/.space.kts index a924a13..d62705d 100644 --- a/.space.kts +++ b/.space.kts @@ -62,7 +62,6 @@ job("Build, test and install ICAT project artifacts") { BRANCH=${'$'}(echo ${'$'}JB_SPACE_GIT_BRANCH | cut -d'/' -f 3) crane auth login geocat.registry.jetbrains.space -u ${'$'}JB_SPACE_CLIENT_ID -p ${'$'}JB_SPACE_CLIENT_SECRET crane auth login ${'$'}GEOCAT_DOCKER_REGISTRY_URL -u ${'$'}GEOCAT_DOCKER_REGISTRY_USER -p ${'$'}GEOCAT_DOCKER_REGISTRY_PASSWORD - crane auth login ghcr.io -u ${'$'}GITHUB_REGISTRY_USERNAME -p ${'$'}GITHUB_REGISTRY_PAT crane copy geocat.registry.jetbrains.space/p/jrc-inspire-portal/docker/icat:${'$'}BRANCH-${'$'}JB_SPACE_EXECUTION_NUMBER ${'$'}GEOCAT_DOCKER_REGISTRY_URL/jrc-inspire-portal/icat:${'$'}BRANCH-${'$'}JB_SPACE_EXECUTION_NUMBER crane copy geocat.registry.jetbrains.space/p/jrc-inspire-portal/docker/icat:${'$'}BRANCH-${'$'}JB_SPACE_EXECUTION_NUMBER ${'$'}GEOCAT_DOCKER_REGISTRY_URL/jrc-inspire-portal/icat:${'$'}BRANCH diff --git a/Dockerfile b/Dockerfile index 1e1d6de..4c9cc42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,7 @@ RUN --mount=type=cache,target=/root/.m2/repository \ FROM eclipse-temurin:8-jre as finalImage -LABEL vendor="GeoCat B.V." -LABEL org.opencontainers.image.source https://github.com/GeoCat/icat +LABEL maintainer="GeoCat B.V." # Check the file application.properties for a description of the environment variables that can be customized. diff --git a/DockerfileSpace b/DockerfileSpace index e665deb..bd080bb 100644 --- a/DockerfileSpace +++ b/DockerfileSpace @@ -18,8 +18,7 @@ RUN java -Djarmode=layertools -jar icat.jar extract FROM eclipse-temurin:8-jre as finalImage -LABEL vendor="GeoCat B.V." -LABEL org.opencontainers.image.source https://github.com/GeoCat/icat +LABEL maintainer="GeoCat B.V." # Check the file application.properties for a description of the environment variables that can be customized.