From e67d068d798816a07e813537eb9a7df675ae0f56 Mon Sep 17 00:00:00 2001 From: Nanjiang Shu Date: Wed, 2 Aug 2023 13:59:17 +0200 Subject: [PATCH] use lowercase tag name --- .github/workflows/tag_and_build.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tag_and_build.yml b/.github/workflows/tag_and_build.yml index 633e995..e74fc2e 100644 --- a/.github/workflows/tag_and_build.yml +++ b/.github/workflows/tag_and_build.yml @@ -1,8 +1,8 @@ name: Build and push Docker image on: push: - branches: - - main +# branches: +# - main jobs: build-and-push: @@ -19,6 +19,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Get lower case repository owner + id: repo_owner + users: ASzc/change-string-case-action@v4 + with: + repo_owner: ${{ github.repository_owner }} + - name: Build image uses: docker/build-push-action@v4 with: @@ -26,8 +32,8 @@ jobs: file: ./Dockerfile push: true tags: | - ghcr.io/${{ github.repository_owner }}/shinynbis:latest - ghcr.io/${{ github.repository_owner }}/shinynbis:${{ needs.tag.outputs.tag }} + ghcr.io/${{ steps.repo_owner.outputs.lowercase }}/shinynbis:latest + ghcr.io/${{ steps.repo_owner.outputs.lowercase }}/shinynbis:${{ needs.tag.outputs.tag }} labels: | org.opencontainers.image.source=${{ github.event.repository.clone_url }} org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')