File tree Expand file tree Collapse file tree 1 file changed +12
-21
lines changed Expand file tree Collapse file tree 1 file changed +12
-21
lines changed Original file line number Diff line number Diff line change @@ -21,43 +21,34 @@ concurrency:
21
21
cancel-in-progress : true
22
22
23
23
jobs :
24
- setup-environment :
25
- timeout-minutes : 30
24
+ check-codeowners :
26
25
runs-on : ubuntu-24.04
27
26
if : ${{ github.actor != 'dependabot[bot]' }}
28
27
steps :
29
28
- uses : actions/checkout@v4
30
- - uses : actions/setup-go@v5
31
- with :
32
- go-version : " 1.22.8"
33
- cache : false
34
- - name : Cache Go
35
- id : go-cache
29
+
30
+ - name : Cache Go Tools
31
+ id : go-tools-cache
36
32
timeout-minutes : 5
37
33
uses : actions/cache@v4
38
34
with :
39
35
path : |
40
- ~/go/bin
41
- ~/go/pkg/mod
42
36
./.tools
43
- key : go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
44
- check-codeowners :
45
- runs-on : ubuntu-24.04
46
- needs : [setup-environment]
47
- steps :
48
- - uses : actions/checkout@v4
49
- - name : Gen githubgen tool
50
- if : github.repository == 'open-telemetry/opentelemetry-collector-contrib'
37
+ key : go-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}
38
+
39
+ - name : Install tools
40
+ if : github.repository == 'open-telemetry/opentelemetry-collector-contrib' && steps.go-tools-cache.outputs.cache-hit != 'true'
51
41
run : |
52
- make githubgen- install
53
- echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
42
+ make install-tools
43
+
54
44
- uses : actions/checkout@v4
55
45
with :
56
46
ref : ${{github.event.pull_request.head.ref}}
57
47
repository : ${{github.event.pull_request.head.repo.full_name}}
58
48
path : pr
49
+
59
50
- name : Gen CODEOWNERS
60
51
run : |
61
52
cd pr
62
- GITHUB_TOKEN=${{ secrets.READ_ORG_AND_USER_TOKEN }} githubgen
53
+ GITHUB_TOKEN=${{ secrets.READ_ORG_AND_USER_TOKEN }} ./.tools/ githubgen codeowners
63
54
git diff -s --exit-code || (echo 'Generated code is out of date, please apply this diff and commit the changes in this PR.' && git diff && exit 1)
You can’t perform that action at this time.
0 commit comments