Skip to content

Update Golang Dependencies #15

Update Golang Dependencies

Update Golang Dependencies #15

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-latest
steps:
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.23.1
- name: Check out code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: main
- 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