File tree Expand file tree Collapse file tree 7 files changed +61
-18
lines changed Expand file tree Collapse file tree 7 files changed +61
-18
lines changed Original file line number Diff line number Diff line change 23
23
GRAFANA_ACCESS_POLICY_TOKEN : ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}
24
24
steps :
25
25
- uses : actions/checkout@v4
26
+ with :
27
+ persist-credentials : false
26
28
27
29
- name : Setup Node.js environment
28
30
uses : actions/setup-node@v4
@@ -52,13 +54,13 @@ jobs:
52
54
cache-dependency-path : " **/*.sum"
53
55
54
56
- name : Test backend
55
- uses : magefile/mage-action@v3
57
+ uses : magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
56
58
with :
57
59
version : latest
58
60
args : coverage
59
61
60
62
- name : Build backend
61
- uses : magefile/mage-action@v3
63
+ uses : magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
62
64
with :
63
65
version : latest
64
66
args : build:linux
82
84
83
85
- name : Package plugin
84
86
id : package-plugin
87
+ env :
88
+ PLUGIN_ID : ${{ steps.metadata.outputs.plugin-id }}
89
+ ARCHIVE : ${{ steps.metadata.outputs.archive }}
85
90
run : |
86
- mv dist ${{ steps.metadata.outputs.plugin-id }}
87
- zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r
91
+ mv dist "$PLUGIN_ID"
92
+ zip "$ARCHIVE" "$PLUGIN_ID" -r
88
93
89
94
- name : Archive Build
90
95
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change 4
4
5
5
permissions :
6
6
contents : read
7
- id-token : write
8
7
9
8
concurrency :
10
9
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20
19
steps :
21
20
- name : Checkout
22
21
uses : actions/checkout@v4
22
+ with :
23
+ persist-credentials : false
24
+
23
25
- name : Resolve Grafana E2E versions
24
26
id : resolve-versions
25
27
uses : grafana/plugin-actions/e2e-version@main
28
30
29
31
playwright-tests :
30
32
needs : resolve-versions
33
+ permissions :
34
+ id-token : write
31
35
timeout-minutes : 60
32
36
strategy :
33
37
fail-fast : false
42
46
run : echo "Running for ${{ matrix.GRAFANA_IMAGE.name }}@${{ matrix.GRAFANA_IMAGE.VERSION }}"
43
47
44
48
- uses : actions/checkout@v4
49
+ with :
50
+ persist-credentials : false
45
51
46
52
- name : Setup Node.js environment
47
53
uses : actions/setup-node@v4
53
59
run : yarn install
54
60
55
61
- name : Install Mage
56
- uses : magefile/mage-action@v3
62
+ uses : magefile/mage-action@6f50bbb8ea47d56e62dee92392788acbc8192d0b # v3.1.0
57
63
with :
58
64
install-only : true
59
65
72
78
GRAFANA_VERSION=${{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=${{ matrix.GRAFANA_IMAGE.NAME }} docker compose up -d
73
79
74
80
- name : Wait for Grafana to start
75
- uses : nev7n/wait_for_response@v1
76
- with :
77
- url : ' http://localhost:3000/'
78
- responseCode : 200
79
- timeout : 60000
80
- interval : 500
81
+ uses : grafana/plugin-actions/wait-for-grafana@main
81
82
82
83
- name : Run Playwright tests
83
84
id : run-tests
Original file line number Diff line number Diff line change 1
1
name : Latest Grafana API compatibility check
2
2
on : [pull_request]
3
+ permissions : {}
3
4
4
5
jobs :
5
6
compatibilitycheck :
6
7
runs-on : ubuntu-latest
8
+ permissions :
9
+ contents : read
7
10
steps :
8
11
- uses : actions/checkout@v4
12
+ with :
13
+ persist-credentials : false
9
14
- name : Setup Node.js environment
10
15
uses : actions/setup-node@v4
11
16
with :
Original file line number Diff line number Diff line change @@ -2,8 +2,12 @@ name: Run commands when issues are labeled
2
2
on :
3
3
issues :
4
4
types : [labeled, unlabeled]
5
+ permissions : {}
5
6
jobs :
6
7
main :
8
+ permissions :
9
+ contents : read
10
+ issues : write
7
11
runs-on : ubuntu-latest
8
12
steps :
9
13
- name : Checkout Actions
@@ -12,14 +16,22 @@ jobs:
12
16
repository : ' grafana/grafana-github-actions'
13
17
path : ./actions
14
18
ref : main
19
+ persist-credentials : false
15
20
- name : Install Actions
16
21
run : npm install --production --prefix ./actions
22
+ - name : Get secrets from vault
23
+ id : get-secrets
24
+ uses : grafana/shared-workflows/actions/get-vault-secrets@main
25
+ with :
26
+ repo_secrets : |
27
+ AWS_DS_TOKEN_CREATOR_ID=aws-ds-token-creator:app_id
28
+ AWS_DS_TOKEN_CREATOR_PEM=aws-ds-token-creator:pem
17
29
- name : ' Generate token'
18
30
id : generate_token
19
31
uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
20
32
with :
21
- app_id : ${{ secrets .AWS_DS_TOKEN_CREATOR_ID }}
22
- private_key : ${{ secrets .AWS_DS_TOKEN_CREATOR_PEM }}
33
+ app_id : ${{ env .AWS_DS_TOKEN_CREATOR_ID }}
34
+ private_key : ${{ env .AWS_DS_TOKEN_CREATOR_PEM }}
23
35
- name : Run Commands
24
36
uses : ./actions/commands
25
37
with :
Original file line number Diff line number Diff line change 6
6
- opened
7
7
concurrency :
8
8
group : pr-commands-${{ github.event.number }}
9
+ permissions : {}
9
10
jobs :
10
11
main :
11
12
runs-on : ubuntu-latest
13
+ permissions :
14
+ contents : read
15
+ pull-requests : write
12
16
steps :
13
17
- name : Checkout Actions
14
18
uses : actions/checkout@v4
15
19
with :
16
20
repository : ' grafana/grafana-github-actions'
17
21
path : ./actions
18
22
ref : main
23
+ persist-credentials : false
19
24
- name : Install Actions
20
25
run : npm install --production --prefix ./actions
26
+ - name : Get secrets from vault
27
+ id : get-secrets
28
+ uses : grafana/shared-workflows/actions/get-vault-secrets@main
29
+ with :
30
+ repo_secrets : |
31
+ AWS_DS_TOKEN_CREATOR_ID=aws-ds-token-creator:app_id
32
+ AWS_DS_TOKEN_CREATOR_PEM=aws-ds-token-creator:pem
21
33
- name : ' Generate token'
22
34
id : generate_token
23
35
uses : tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
24
36
with :
25
- app_id : ${{ secrets .AWS_DS_TOKEN_CREATOR_ID }}
26
- private_key : ${{ secrets .AWS_DS_TOKEN_CREATOR_PEM }}
37
+ app_id : ${{ env .AWS_DS_TOKEN_CREATOR_ID }}
38
+ private_key : ${{ env .AWS_DS_TOKEN_CREATOR_PEM }}
27
39
- name : Run Commands
28
40
uses : ./actions/commands
29
41
with :
Original file line number Diff line number Diff line change 7
7
tags :
8
8
- ' v*' # Run workflow on version tags, e.g. v1.0.0.
9
9
10
- permissions :
11
- contents : write
10
+ permissions : {}
12
11
13
12
jobs :
14
13
release :
17
16
runs-on : ubuntu-latest
18
17
steps :
19
18
- uses : actions/checkout@v4
19
+ with :
20
+ persist-credentials : false
20
21
- uses : grafana/plugin-actions/build-plugin@release
21
22
with :
22
23
policy_token : ${{ secrets.GRAFANA_ACCESS_POLICY_TOKEN }}
Original file line number Diff line number Diff line change
1
+ rules :
2
+ unpinned-uses :
3
+ config :
4
+ policies :
5
+ actions/* : any
6
+ github/* : any
7
+ grafana/* : any
You can’t perform that action at this time.
0 commit comments