Skip to content

Commit

Permalink
chore: update docker workflow to push image to ghcr with sudo and log…
Browse files Browse the repository at this point in the history
… in with github token
  • Loading branch information
HsiangNianian committed Sep 24, 2024
1 parent 16197f5 commit 877534d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions/checkout@v4

- name: Build image
run: docker build . --file Dockerfile.prod --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"
run: sudo docker build . --file Dockerfile.prod --tag $IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
Expand All @@ -55,4 +55,4 @@ jobs:
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
sudo docker push $IMAGE_ID:$VERSION

0 comments on commit 877534d

Please sign in to comment.