-
Notifications
You must be signed in to change notification settings - Fork 93
39 lines (36 loc) · 1.27 KB
/
tidy.yml
File metadata and controls
39 lines (36 loc) · 1.27 KB
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
name: "Tidy Renovate PRs"
permissions:
contents: read
on:
pull_request_target:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
tidy:
permissions:
contents: write
runs-on: ubuntu-latest
# This workflow is used to ensure Renovate and Dependabot PRs to Go code are 'tidy' and are reflected in the generated code produced by makefile command
if: ${{ contains(fromJson('["renovate[bot]", "dependabot[bot]"]'), github.actor) && github.event.pull_request.head.repo.fork == false }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: "1.26.2"
- name: make genotelarrowcol
# This also runs 'go mod tidy' as part of its process
run: make genotelarrowcol
- name: Commit changes
run: |
# Configure git for otelbot
git config user.name otelbot
git config user.email 197425009+otelbot@users.noreply.github.com
if ! git diff --exit-code; then
git add .
git commit -m "make genotelarrowcol"
git push
fi