File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,27 +96,28 @@ jobs:
9696 artifact-name : sbom.spdx.json # queda como artefacto del job
9797
9898 publish :
99- name : Publish to Docker Hub
99+ name : Publish to GitHub Container Registry
100100 runs-on : ubuntu-latest
101101 needs : [sast]
102102 steps :
103103 - name : Checkout
104104 uses : actions/checkout@v4
105105
106- - name : Log in to Docker Hub
107- uses : docker/login-action@v3
106+ - name : Log in to GitHub Container Registry
107+ uses : docker/login-action@v2
108108 with :
109- username : ${{ vars.DOCKERHUB_USERNAME }}
110- password : ${{ secrets.DOCKERHUB_TOKEN }}
109+ registry : ghcr.io
110+ username : ${{ github.actor }}
111+ password : ${{ secrets.GITHUB_TOKEN }}
111112
112113 - name : Build and push image
113114 uses : docker/build-push-action@v4
114115 with :
115116 context : ${{ env.APP_DIR }}
116117 push : true
117118 tags : |
118- ${{ vars.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
119- ${{ vars.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
119+ ghcr.io/ ${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
120+ ghcr.io/ ${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
120121
121122
122123 # ─────────────────────────────────────────────────────────────────────────────
You can’t perform that action at this time.
0 commit comments