From c48862985ed8ccfa097e4db12820feaf2816750a Mon Sep 17 00:00:00 2001 From: rxdn <29165304+rxdn@users.noreply.github.com> Date: Sun, 2 Jul 2023 18:12:44 +0100 Subject: [PATCH] Update CI --- .github/workflows/build-and-publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index dc322ae..2a80ff4 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -2,6 +2,7 @@ name: Build and Publish env: REGISTRY: ghcr.io + PACKAGE_NAME: api GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} GITHUB_SHA: ${{ github.sha }} @@ -27,6 +28,11 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Set image name + run: | + echo "OWNER_LC=${OWNER,,}" >> ${GITHUB_ENV} + echo "IMAGE_NAME=${REGISTRY}/${GITHUB_REPOSITORY_OWNER,,}/${PACKAGE_NAME,,}:${GITHUB_SHA}" >> ${GITHUB_ENV} + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 @@ -38,5 +44,5 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER }}/api:${{ env.GITHUB_SHA }} + tags: ${{ env.IMAGE_NAME }} labels: ${{ steps.meta.outputs.labels }}