Skip to content

Commit 570ee91

Browse files
committed
Tweak
Signed-off-by: Arve Knudsen <[email protected]>
1 parent ceb4088 commit 570ee91

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/push-mimir-build-image.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,6 @@ jobs:
1919
# Necessary to authenticate with Vault which happens in dockerhub-login
2020
id-token: write
2121
steps:
22-
# Retrieve GitHub App credentials to get a token with org member read permissions.
23-
# GITHUB_TOKEN doesn't have org-level permissions, so we use the mimir-github-bot GitHub App.
24-
- name: Retrieve GitHub App Credentials from Vault
25-
id: get-secrets
26-
uses: grafana/shared-workflows/actions/get-vault-secrets@28361cdb22223e5f1e34358c86c20908e7248760 # v1.1.0
27-
with:
28-
repo_secrets: |
29-
APP_ID=mimir-github-bot:app_id
30-
PRIVATE_KEY=mimir-github-bot:private_key
31-
32-
- name: Generate GitHub App Token
33-
id: app-token
34-
uses: actions/create-github-app-token@v1
35-
with:
36-
app-id: ${{ env.APP_ID }}
37-
private-key: ${{ env.PRIVATE_KEY }}
38-
owner: ${{ github.repository_owner }}
39-
4022
- name: Checkout Repository
4123
uses: actions/checkout@v4
4224
with:
@@ -64,6 +46,24 @@ jobs:
6446
echo "::error::This workflow only excecutes when mimir-build-image/Dockerfile has been modified"
6547
exit 1
6648
49+
# Retrieve GitHub App credentials to get a token with org member read permissions.
50+
# GITHUB_TOKEN doesn't have org-level permissions, so we use the mimir-github-bot GitHub App.
51+
- name: Retrieve GitHub App Credentials from Vault
52+
id: get-secrets
53+
uses: grafana/shared-workflows/actions/get-vault-secrets@28361cdb22223e5f1e34358c86c20908e7248760 # v1.1.0
54+
with:
55+
repo_secrets: |
56+
APP_ID=mimir-github-bot:app_id
57+
PRIVATE_KEY=mimir-github-bot:private_key
58+
59+
- name: Generate GitHub App Token
60+
id: app-token
61+
uses: actions/create-github-app-token@v1
62+
with:
63+
app-id: ${{ env.APP_ID }}
64+
private-key: ${{ env.PRIVATE_KEY }}
65+
owner: ${{ github.repository_owner }}
66+
6767
# Check if PR author is a Grafana organization member using the GitHub API.
6868
# This is more reliable than author_association which depends on public membership visibility.
6969
# Uses the GitHub App token because GITHUB_TOKEN doesn't have org-level permissions.

0 commit comments

Comments
 (0)