Skip to content

Commit

Permalink
chore: add docker login to ghcr.io
Browse files Browse the repository at this point in the history
Signed-off-by: Lam Tran <[email protected]>
  • Loading branch information
tranngoclam authored and Lam Tran committed Nov 15, 2023
1 parent 5a7a096 commit 737fad9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,23 @@ jobs:
id: meta
with:
images: |
ghcr.io/tranngoclam/monorepo-${{ matrix.service }}
ghcr.io/${{ github.actor }}/monorepo-${{ matrix.service }}
tags: |
type=sha,enable=true,format=long,priority=200
type=raw,enable=true,value=latest,priority=100
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build/Tag/Push Docker Image
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
file: ${{ matrix.service }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 737fad9

Please sign in to comment.