Skip to content

Commit

Permalink
Update environment variables and login credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
sofusalbertsen committed Jan 31, 2024
1 parent 14e6587 commit 2d99b0b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/build-docker.sh
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 1 addition & 1 deletion ci/push-docker.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 2d99b0b

Please sign in to comment.