forked from open-telemetry/opentelemetry-collector-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.71 KB
/
tidy-dependencies.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
name: "Project: Tidy"
on:
pull_request_target:
types: [opened, ready_for_review, synchronize, reopened, labeled, unlabeled]
branches:
- main
jobs:
setup-environment:
# disabling until permission issues is resolved
# see: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/22953
if: ${{ false }}
timeout-minutes: 30
runs-on: ubuntu-latest
# if: ${{ contains(github.event.pull_request.labels.*.name, 'dependencies') }}
steps:
- uses: actions/checkout@v3
with:
repository: "renovate-bot/open-telemetry-_-opentelemetry-collector-contrib"
ref: ${{ github.head_ref }}
token: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version: 1.19
cache: false
- name: Cache Go
id: go-cache
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: go mod tidy
run: |
make gotidy
git config user.name opentelemetrybot
git config user.email [email protected]
echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy\" && git push)"
git diff --exit-code || (git add . && git commit -m "go mod tidy" && git push)
env:
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}