@@ -2,7 +2,7 @@ name: Build and Push
22
33on :
44 push :
5- branches : [dev, main]
5+ branches : [dev, main, feat/** ]
66
77env :
88 REGISTRY : ghcr.io
@@ -13,20 +13,20 @@ jobs:
1313 runs-on : ubuntu-latest
1414 permissions :
1515 contents : read
16- # packages: write
16+ packages : write
1717
1818 steps :
1919 - uses : actions/checkout@v4
2020
2121 - name : Set up Docker Buildx
2222 uses : docker/setup-buildx-action@v3
2323
24- # - name: Log in to the Container registry
25- # uses: docker/login-action@v3
26- # with:
27- # registry: ${{ env.REGISTRY }}
28- # username: ${{ github.actor }}
29- # password: ${{ secrets.GITHUB_TOKEN }}
24+ - name : Log in to the Container registry
25+ uses : docker/login-action@v3
26+ with :
27+ registry : ${{ env.REGISTRY }}
28+ username : ${{ github.actor }}
29+ password : ${{ secrets.GITHUB_TOKEN }}
3030
3131 - name : Extract metadata (tags, labels)
3232 id : meta
@@ -36,13 +36,14 @@ jobs:
3636 tags : |
3737 type=ref,event=branch
3838 type=sha,format=short
39+ type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
3940
4041 - name : Build and push Docker image
4142 uses : docker/build-push-action@v5
4243 with :
4344 context : .
4445 file : ./Dockerfile.prod
45- push : false # add true, if your setup variables
46+ push : true
4647 tags : ${{ steps.meta.outputs.tags }}
4748 labels : ${{ steps.meta.outputs.labels }}
4849 cache-from : type=gha
0 commit comments