File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change 17
17
jobs :
18
18
update :
19
19
runs-on : ubuntu-latest
20
+ outputs :
21
+ commit_hash : ${{ steps.commit-and-push.outputs.commit_hash }}
22
+
20
23
steps :
21
24
- uses : actions/checkout@v3
22
25
- name : Update Dockerfile
@@ -42,20 +45,11 @@ jobs:
42
45
43
46
END
44
47
45
- - name : Commit updates
46
- run : |
47
- if [ -n "$(git status --porcelain)" ]; then
48
- git config --local user.email "workflow@github.com"
49
- git config --local user.name "GitHub Workflow"
50
- git add -A
51
- git commit -m "Apply updates from Nginx repository"
52
- fi
53
-
54
- - name : Push changes
55
- uses : ad-m/github-push-action@master
48
+ - name : Commit and push changes
49
+ id : commit-and-push
50
+ uses : stefanzweifel/git-auto-commit-action@v4
56
51
with :
57
- github_token : ${{ secrets.GITHUB_TOKEN }}
58
- force : true
52
+ commit_message : Apply updates from Nginx repository
59
53
60
54
build :
61
55
needs : update
@@ -64,10 +58,13 @@ jobs:
64
58
contents : read
65
59
packages : write
66
60
id-token : write
61
+
67
62
steps :
68
63
- name : Checkout repository
69
64
uses : actions/checkout@v3
70
-
65
+ with :
66
+ ref : ${{ needs.update.outputs.commit_hash }}
67
+
71
68
- name : Install cosign
72
69
if : github.event_name != 'pull_request'
73
70
uses : sigstore/cosign-installer@main
You can’t perform that action at this time.
0 commit comments