File tree Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Expand file tree Collapse file tree 1 file changed +23
-3
lines changed Original file line number Diff line number Diff line change 73
73
replace : " FROM golang:${{ steps.go-version.outputs.latest_go_version }}-bookworm as builder-base"
74
74
path : " Dockerfile"
75
75
76
- - name : Commit and push changes (optional)
77
- uses : stefanzweifel/git-auto-commit-action@v4
76
+ - name : Check if Go version was updated
77
+ id : check-changes
78
+ run : |
79
+ if [[ ${{ steps.current-go-version.outputs.current_go_version }} != ${{ steps.go-version.outputs.latest_go_version }} ]]; then
80
+ echo "changes=true" >> $GITHUB_OUTPUT
81
+ else
82
+ echo "changes=false" >> $GITHUB_OUTPUT
83
+ fi
84
+
85
+ - name : Create Pull Request
86
+ if : ${{ steps.check-changes.outputs.changes == 'true' }} # Only create PR if there were changes
87
+ uses : peter-evans/create-pull-request@v6
78
88
with :
79
- commit_message : " Update Go version in Dockerfile"
89
+ title : ' Update Go version in Dockerfile'
90
+ commit-message : ' Update Go version in Dockerfile'
91
+ committer :
github-actions <[email protected] >
92
+ author :
github-actions <[email protected] >
93
+ branch : go-version-update # Choose a suitable branch name
94
+ branch-suffix : timestamp
95
+ base : master
96
+ delete-branch : true
97
+ labels : ok-to-test
98
+ body : |
99
+ This PR updates the Go version in the Dockerfile to ${{ steps.go-version.outputs.latest_go_version }}.
80
100
You can’t perform that action at this time.
0 commit comments