-
-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (47 loc) · 1.46 KB
/
pr-tidy.yaml
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
---
name: pr-tidy
on:
pull_request_target:
env:
GO111MODULE: "on"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
tidy:
runs-on: ubuntu-latest
if: ${{ startsWith(github.head_ref, 'dependabot/go_modules/') }}
steps:
- name: Checkout code
uses: nhatthm/gh-actions/checkout@master
with:
token: ${{ secrets.PUSH_TOKEN }}
ref: ${{ github.head_ref }}
- name: Find Go version
uses: nhatthm/gh-actions/find-go-version@master
- name: Install Go
uses: nhatthm/gh-actions/setup-go@master
with:
go-version: ${{ env.GO_VERSION }}
- name: Tidy
run: |
make tidy
- name: Setup GPG
id: setup-gpg
uses: nhatthm/gh-actions/import-gpg@master
with:
gpg_private_key: ${{ secrets.PUSH_PRIVATE_KEY }}
passphrase: ${{ secrets.PUSH_SECRET }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: false
- name: Add and Commit
uses: nhatthm/gh-actions/git-add-and-commit@master
with:
message: "go mod tidy"
push: true
author_name: ${{ steps.setup-gpg.outputs.name }}
author_email: ${{ steps.setup-gpg.outputs.email }}
committer_name: ${{ steps.setup-gpg.outputs.name }}
committer_email: ${{ steps.setup-gpg.outputs.email }}