-
Notifications
You must be signed in to change notification settings - Fork 98
73 lines (64 loc) · 2.01 KB
/
renovate-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Run build for renovate PRs
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
defaults:
run:
shell: bash
concurrency:
group: ${{ github.ref_name }}-renovate
cancel-in-progress: true
jobs:
check:
name: Check for changes
runs-on: ubuntu-24.04
outputs:
generate: ${{ steps.filter.outputs.generate }}
permissions:
pull-requests: read
if: ${{ github.actor == 'renovate[bot]' }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check for changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
generate:
- go.mod
- go.sum
- Makefile
build:
name: Build for renovate PRs
runs-on: ubuntu-24.04
needs: check
permissions:
contents: write
if: ${{ needs.check.outputs.generate == 'true' }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.NGINX_PAT }}
- name: Setup Golang Environment
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: stable
cache-dependency-path: |
go.sum
.github/.cache/buster-for-generate
# go mod tidy can be removed once https://github.com/renovatebot/renovate/issues/12999 is implemented
- name: Update files for renovate
run: |
make generate-all
cd tests && go mod tidy && go mod verify
- name: Commit changes
id: commit
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: "Update files for renovate"
commit_author: "renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>"