File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 88 REGISTRY : ghcr.io
99 REPO_NAME : ${{ github.repository }}
1010 IMAGE_NAME : ${{ github.sha }}
11+ REPO_OWNER : ${{ github.repository_owner }}
1112
1213jobs :
1314 release :
@@ -25,13 +26,15 @@ jobs:
2526 fetch-depth : 0
2627
2728 - name : LOGIN TO GITHUB CONTAINER REGISTRY
28- run : docker login ${{ env.REGISTRY }} -u ${{ github.repository_owner }} -p "${{ secrets.GHCR_TOKEN }}"
29+ run : docker login ${{ env.REGISTRY }} -u ${{ env.REPO_OWNER }} -p "${{ secrets.GHCR_TOKEN }}"
2930
3031 - name : EXTRACT METADATA FOR DOCKER
3132 id : meta
3233 uses : docker/metadata-action@v4
3334 with :
34- images : ${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ env.IMAGE_NAME }}
35+ images : ${{ env.REGISTRY }}/${{ env.REPO_NAME }}
36+ tags : |
37+ type=sha
3538
3639 - name : BUILD AND PUSH
3740 uses : docker/build-push-action@v4
@@ -106,7 +109,7 @@ jobs:
106109 kubectl apply -f frontend-service.yml
107110
108111 echo "SETTING NEW TAG TO DEPLOYMENT"
109- kubectl set image deployment/sskd-frontend-deployment sskd-frontend=${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ env.IMAGE_NAME }} -n sskd
112+ kubectl set image deployment/sskd-frontend-deployment sskd-frontend=${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ steps.meta.outputs.version }} -n sskd
110113
111114 echo "WAITING FOR POD"
112115 kubectl rollout status deployment/sskd-frontend-deployment -n sskd --timeout=300s
Original file line number Diff line number Diff line change 1919 - name : ghcr-secret-frontend
2020 containers :
2121 - name : sskd-frontend
22- image : ghcr.io/etozhealkhipce/senior-script-kiddie:main
22+ image : ghcr.io
2323 imagePullPolicy : Always
2424 ports :
2525 - containerPort : 80
You can’t perform that action at this time.
0 commit comments