Skip to content

Cherry-pick cbf146b5ebefeb27acc409e105d14cfc83567b63 with conflicts #39

Cherry-pick cbf146b5ebefeb27acc409e105d14cfc83567b63 with conflicts

Cherry-pick cbf146b5ebefeb27acc409e105d14cfc83567b63 with conflicts #39

name: Update Golang Dependencies
on:
schedule:
- cron: "0 0 1,15 * *" # Runs every month on the 1st and 15th days at midnight UTC
workflow_dispatch:
permissions: read-all
jobs:
update_golang_deps:
if: github.repository == 'vitessio/vitess'
permissions:
contents: write
pull-requests: write
name: Update Golang Dependencies
runs-on: ubuntu-24.04
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.10
- name: Check out code
<<<<<<< HEAD

Check failure on line 25 in .github/workflows/update_golang_dependencies.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update_golang_dependencies.yml

Invalid workflow file

You have an error in your yaml syntax on line 25
uses: actions/checkout@v4
=======
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
>>>>>>> cbf146b5eb (Security improvements to GitHub Actions (#17520))
with:
ref: main
persist-credentials: 'false'
- name: Upgrade the Golang Dependencies
id: detect-and-update
run: |
go get -u ./...
output=$(git status -s)
if [ -z "${output}" ]; then
exit 0
fi
go mod tidy
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.CREATE_PR_VITESS_BOT }}
branch: "upgrade-go-deps-on-main"
commit-message: "upgrade go deps"
signoff: true
delete-branch: true
team-reviewers: Release
title: "Upgrade the Golang Dependencies"
body: |
This Pull Request updates all the Golang dependencies to their latest version using `go get -u ./...`.
cc @vitessio/release
base: main
labels: |
go
Component: General
Type: Dependencies