Skip to content

Commit ba5d6c5

Browse files
Add GH workflow to fetch and generate ownership metadata
1 parent ab4e7c5 commit ba5d6c5

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Fetch and generate ownership information
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
jobs:
7+
fetch-owners:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repo
11+
uses: actions/checkout@v4
12+
- name: Checkout shared workflows
13+
uses: actions/checkout@v4
14+
with:
15+
repository: grafana/shared-workflows
16+
path: shared-workflows
17+
- name: Copy Shared Actions
18+
run: |
19+
mkdir -p /home/runner/work/plugins-private/plugins-private/shared-workflows
20+
cp -r $GITHUB_WORKSPACE/shared-workflows/* /home/runner/work/plugins-private/plugins-private/shared-workflows
21+
- name: Get IAP Token
22+
id: get-secrets
23+
uses: ./shared-workflows/actions/get-vault-secrets
24+
with:
25+
# Secrets placed in the ci/common/<path> path in Vault
26+
common_secrets: |
27+
GCP_IAP_SERVICE_ACCOUNT_KEY_DEV=grafana-com-iap:gcp_iap_service_account_key_ops
28+
- name: gcloud-iap-auth-dev
29+
run: |
30+
printenv GCP_IAP_SERVICE_ACCOUNT_KEY_DEV > /tmp/gcp_service_account_key.json
31+
gcloud auth activate-service-account --key-file=/tmp/gcp_service_account_key.json
32+
gcloud auth print-identity-token \
33+
--audiences="194555723165-aftshfqa32nig79trcrh96ha94ta46jd.apps.googleusercontent.com" \
34+
--project "grafanalabs-global" \
35+
--quiet \
36+
--verbosity=error > /tmp/iap.token
37+
- name: Generate CODEOWNERS file
38+
run: go run ./scripts/generate-codeowners/...

0 commit comments

Comments
 (0)