-
Notifications
You must be signed in to change notification settings - Fork 152
43 lines (37 loc) · 1.3 KB
/
go-mod-tidy.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
name: Go mod tidy
on:
pull_request:
branches: [develop]
jobs:
build:
name: run go mod tidy
runs-on: ubuntu-latest
# don't run on PRs from forks (it will fail because secrets won't be available), run only on renovate bot PRs
if: github.actor == 'renovate[bot]'
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: "1.21"
id: go
- name: Generate token # generate a token to trigger the rest of the CI tasks... https://github.com/tibdex/github-app-token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.IOTA_GH_APP_ID }}
private_key: ${{ secrets.IOTA_GH_APP_PRIVATE_KEY }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.generate_token.outputs.token }}
- name: Run go mod tidy script
run: ./scripts/go_mod_tidy.sh
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions
committer_email: actions@github.com
message: "go mod tidy"
add: "."