Skip to content

Commit

Permalink
Merge pull request #942 from jingxu97/patch-2
Browse files Browse the repository at this point in the history
Update update-deps.yml update-go-version job
  • Loading branch information
k8s-ci-robot authored Aug 17, 2024
2 parents ba355ee + 5f99c4d commit c7befef
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/update-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,28 @@ jobs:
replace: "FROM golang:${{ steps.go-version.outputs.latest_go_version }}-bookworm as builder-base"
path: "Dockerfile"

- name: Commit and push changes (optional)
uses: stefanzweifel/git-auto-commit-action@v4
- name: Check if Go version was updated
id: check-changes
run: |
if [[ ${{ steps.current-go-version.outputs.current_go_version }} != ${{ steps.go-version.outputs.latest_go_version }} ]]; then
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: ${{ steps.check-changes.outputs.changes == 'true' }} # Only create PR if there were changes
uses: peter-evans/create-pull-request@v6
with:
commit_message: "Update Go version in Dockerfile"
title: 'Update Go version in Dockerfile'
commit-message: 'Update Go version in Dockerfile'
committer: github-actions <[email protected]>
author: github-actions <[email protected]>
branch: go-version-update # Choose a suitable branch name
branch-suffix: timestamp
base: master
delete-branch: true
labels: ok-to-test
body: |
This PR updates the Go version in the Dockerfile to ${{ steps.go-version.outputs.latest_go_version }}.

0 comments on commit c7befef

Please sign in to comment.