forked from open-cluster-management-io/addon-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.29 KB
/
Copy pathpr-verify.yml
File metadata and controls
48 lines (43 loc) · 1.29 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
40
41
42
43
44
45
46
47
48
name: PR Verifier
on:
# NB: using `pull_request_target` runs this in the context of
# the base repository, so it has permission to upload to the checks API.
# This means changes won't kick in to this file until merged onto the
# main branch.
pull_request_target:
types: [opened, edited, reopened, synchronize]
permissions:
contents: read
jobs:
verify:
name: verify PR contents
permissions:
checks: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Verifier action
id: verifier
uses: kubernetes-sigs/kubebuilder-release-tools@v0.4.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
generate-matrix:
uses: ./.github/workflows/generate-matrix.yaml
secrets: inherit
auto-label:
name: Auto add label for each repo
needs: generate-matrix
if: needs.generate-matrix.outputs.matrix != ''
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Add label ${{ matrix.repo }} to PR
uses: actions-ecosystem/action-add-labels@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: ${{ matrix.repo }}