Merge pull request #636 from prymitive/go-mod-upgrades #232
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go mod tidy | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- go.mod | |
- go.sum | |
- tools/*/go.mod | |
- tools/*/go.sum | |
jobs: | |
version-sync: | |
name: Run go mod tidy | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.4 | |
- name: Run go mod tidy | |
run: | | |
go mod tidy | |
make tools-go-mod-tidy | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
token: ${{ secrets.GH_REPO_TOKEN }} | |
author: "Łukasz Mierzwa <[email protected]>" | |
commit-message: "fix(deps): run go mod tidy" | |
branch: go-mod-tidy | |
delete-branch: true | |
title: "fix(deps): run go mod tidy" | |
labels: automerge | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
run: gh pr merge --merge --auto go-mod-tidy | |
env: | |
GH_TOKEN: ${{ secrets.GH_REPO_TOKEN }} |