Skip to content

Commit cf1ec34

Browse files
committed
CARRY: pr-merge-bot workflow
1 parent d7ba728 commit cf1ec34

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/pr-merge-bot.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: PR dependabot code generation and go modules fix
2+
3+
# This action runs on other PRs opened by merge-bot. It updates modules and generated code on PRs opened by merge-bot.
4+
on:
5+
pull_request:
6+
branches:
7+
- merge-bot**
8+
push:
9+
branches:
10+
- merge-bot**
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: write # Allow to update the PR.
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out code into the Go module directory
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4.2.2
23+
- name: Calculate go version
24+
id: vars
25+
run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT
26+
- name: Set up Go
27+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # tag=v5.1.0
28+
with:
29+
go-version: ${{ steps.vars.outputs.go_version }}
30+
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # tag=v4.1.2
31+
name: Restore go cache
32+
with:
33+
path: |
34+
~/.cache/go-build
35+
~/go/pkg/mod
36+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
37+
restore-keys: |
38+
${{ runner.os }}-go-
39+
- name: Update all modules
40+
run: make modules
41+
- name: Update generated code
42+
run: make generate
43+
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # tag=v9.1.4
44+
name: Commit changes
45+
with:
46+
author_name: shiftstack-merge-bot
47+
author_email: [email protected]
48+
default_author: github_actor
49+
message: 'CARRY: bot: update modules & generate code'

0 commit comments

Comments
 (0)