diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ebb6ce1a..13c810ba 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -3,7 +3,7 @@ on: push env: # Set the secret as an input docker_username: ${{ github.actor }} docker_password: ${{ secrets.GITHUB_TOKEN }} - GIT_COMMIT: "${{ github.sha }} ::8" + GIT_COMMIT: ${{ github.sha }} jobs: Build: runs-on: ubuntu-latest diff --git a/ci/build-docker.sh b/ci/build-docker.sh index 74468c6e..0b4e4d5d 100755 --- a/ci/build-docker.sh +++ b/ci/build-docker.sh @@ -1,5 +1,5 @@ #!/bin/bash [[ -z "${GIT_COMMIT}" ]] && Tag='local' || Tag="${GIT_COMMIT::8}" -REPO="ghcr.io/$github.actor/" +REPO="ghcr.io/$GITHUB_ACTOR/" echo "${REPO}" docker build -t "${REPO}micronaut-app:latest" -t "${REPO}micronaut-app:1.0-$Tag" app/ diff --git a/ci/push-docker.sh b/ci/push-docker.sh index df9b629b..b1cd5367 100755 --- a/ci/push-docker.sh +++ b/ci/push-docker.sh @@ -1,5 +1,5 @@ #!/bin/bash -echo "$secrets.GITHUB_TOKEN" | docker login ghcr.io --username "${{ github.actor }}" --password-stdin +echo "$secrets.GITHUB_TOKEN" | docker login ghcr.io --username "$GITHUB_ACTOR" --password-stdin docker push "ghcr.io/$docker_username/micronaut-app:1.0-${GIT_COMMIT::8}" docker push "ghcr.io/$docker_username/micronaut-app:latest" & wait