File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed
Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 11name : Update Deployment with Commit Hash
2+
23on :
34 workflow_run :
4- workflows : ['Build and Push to GitHub Container Registry']
5- types : [completed]
5+ workflows : ['Build and Push to GitHub Container Registry']
6+ types : [completed]
7+
68jobs :
79 update-deployment :
810 runs-on : ubuntu-latest
@@ -14,13 +16,20 @@ jobs:
1416 ref : main
1517 token : ${{ secrets.GH_TOKEN }}
1618
17- - name : Setup git config
19+ - name : Setup Git Config
20+ run : |
21+ git config --global user.name "github-actions[bot]"
22+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
23+
24+ - name : Update Deployment YAML with Commit Hash
1825 run : |
19- git config --global user.name ${{secrets.USER_NAME}}
20- git config --global user.email ${{secrets.EMAIL}}
21- echo ${{github.sha}}
26+ echo "Updating deployment with commit hash: ${{ github.sha }}"
2227 sed -i "s|\(image:.*:\).*|\1${{ github.sha }}|" k8s-brouter-web/deployment-brouter-web.yaml
2328 git add k8s-brouter-web/deployment-brouter-web.yaml
24- git commit -m "Update deployment with commit hash"
25- - run : echo ${{github}}
26- - run : git push
29+ git commit -m "Update deployment with commit hash ${{ github.sha }}"
30+
31+ - name : Push Changes
32+ env :
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ run : |
35+ git push origin main
You can’t perform that action at this time.
0 commit comments