Skip to content

Commit bf4ad06

Browse files
authored
Merge pull request #7 from ugns/jbouse-patch-1
chore: update to use GitHub Secrets
2 parents 652156e + 9903673 commit bf4ad06

File tree

5 files changed

+18
-95
lines changed

5 files changed

+18
-95
lines changed

.github/workflows/auto-context.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,13 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v3
1818

19-
# Collect necessary secrets from Vault
20-
- name: Vault Secrets
21-
uses: hashicorp/vault-action@v2.4.0
22-
with:
23-
url: ${{ secrets.VAULT_ADDR }}
24-
method: jwt
25-
role: github-actions
26-
path: github
27-
secrets: |
28-
secret/data/actions/github app_id | GH_APP_ID ;
29-
secret/data/actions/github installation_id | GH_INSTALLATION_ID ;
30-
secret/data/actions/github private_key | GH_PRIVATE_KEY
31-
3219
- name: Generate token
3320
id: generate_token
3421
uses: tibdex/github-app-token@v1
3522
with:
36-
app_id: ${{ env.GH_APP_ID }}
37-
private_key: ${{ env.GH_PRIVATE_KEY }}
38-
installation_id: ${{ env.GH_INSTALLATION_ID }}
23+
app_id: ${{ secrets.GH_APP_ID }}
24+
private_key: ${{ secrets.GH_PRIVATE_KEY }}
25+
installation_id: ${{ secrets.GH_INSTALLATION_ID }}
3926

4027
- name: Update context.tf
4128
shell: bash

.github/workflows/auto-format.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,13 @@ jobs:
1313
contents: read
1414

1515
steps:
16-
# Collect necessary secrets from Vault
17-
- name: Vault Secrets
18-
uses: hashicorp/vault-action@v2.4.0
19-
with:
20-
url: ${{ secrets.VAULT_ADDR }}
21-
method: jwt
22-
role: github-actions
23-
path: github
24-
secrets: |
25-
secret/data/actions/github app_id | GH_APP_ID ;
26-
secret/data/actions/github installation_id | GH_INSTALLATION_ID ;
27-
secret/data/actions/github private_key | GH_PRIVATE_KEY
28-
2916
- name: Generate token
3017
id: generate_token
3118
uses: tibdex/github-app-token@v1
3219
with:
33-
app_id: ${{ env.GH_APP_ID }}
34-
private_key: ${{ env.GH_PRIVATE_KEY }}
35-
installation_id: ${{ env.GH_INSTALLATION_ID }}
20+
app_id: ${{ secrets.GH_APP_ID }}
21+
private_key: ${{ secrets.GH_PRIVATE_KEY }}
22+
installation_id: ${{ secrets.GH_INSTALLATION_ID }}
3623

3724
# Checkout the pull request branch
3825
# "An action in a workflow run can’t trigger a new workflow run. For example, if an action pushes code using

.github/workflows/auto-release.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,13 @@ jobs:
1616
contents: read
1717

1818
steps:
19-
# Collect necessary secrets from Vault
20-
- name: Vault Secrets
21-
uses: hashicorp/vault-action@v2.4.0
22-
with:
23-
url: ${{ secrets.VAULT_ADDR }}
24-
method: jwt
25-
role: github-actions
26-
path: github
27-
secrets: |
28-
secret/data/actions/github app_id | GH_APP_ID ;
29-
secret/data/actions/github installation_id | GH_INSTALLATION_ID ;
30-
secret/data/actions/github private_key | GH_PRIVATE_KEY
31-
3219
- name: Generate token
3320
id: generate_token
3421
uses: tibdex/github-app-token@v1
3522
with:
36-
app_id: ${{ env.GH_APP_ID }}
37-
private_key: ${{ env.GH_PRIVATE_KEY }}
38-
installation_id: ${{ env.GH_INSTALLATION_ID }}
23+
app_id: ${{ secrets.GH_APP_ID }}
24+
private_key: ${{ secrets.GH_PRIVATE_KEY }}
25+
installation_id: ${{ secrets.GH_INSTALLATION_ID }}
3926

4027
# Get PR from merged commit to master
4128
- uses: actions-ecosystem/action-get-merged-pull-request@v1

.github/workflows/chatops.yml

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,14 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v3
16-
# Collect necessary secrets from Vault
17-
- name: Vault Secrets
18-
uses: hashicorp/vault-action@v2.4.0
19-
with:
20-
url: ${{ secrets.VAULT_ADDR }}
21-
method: jwt
22-
role: github-actions
23-
path: github
24-
secrets: |
25-
secret/data/actions/github app_id | GH_APP_ID ;
26-
secret/data/actions/github installation_id | GH_INSTALLATION_ID ;
27-
secret/data/actions/github private_key | GH_PRIVATE_KEY
2816

2917
- name: Generate token
3018
id: generate_token
3119
uses: tibdex/github-app-token@v1
3220
with:
33-
app_id: ${{ env.GH_APP_ID }}
34-
private_key: ${{ env.GH_PRIVATE_KEY }}
35-
installation_id: ${{ env.GH_INSTALLATION_ID }}
21+
app_id: ${{ secrets.GH_APP_ID }}
22+
private_key: ${{ secrets.GH_PRIVATE_KEY }}
23+
installation_id: ${{ secrets.GH_INSTALLATION_ID }}
3624

3725
- name: "Handle common commands"
3826
uses: ugns/actions/github/slash-command-dispatch@1.0.0
@@ -55,26 +43,13 @@ jobs:
5543
- name: "Checkout commit"
5644
uses: actions/checkout@v3
5745

58-
# Collect necessary secrets from Vault
59-
- name: Vault Secrets
60-
uses: hashicorp/vault-action@v2.4.0
61-
with:
62-
url: ${{ secrets.VAULT_ADDR }}
63-
method: jwt
64-
role: github-actions
65-
path: github
66-
secrets: |
67-
secret/data/actions/github app_id | GH_APP_ID ;
68-
secret/data/actions/github installation_id | GH_INSTALLATION_ID ;
69-
secret/data/actions/github private_key | GH_PRIVATE_KEY
70-
7146
- name: Generate token
7247
id: generate_token
7348
uses: tibdex/github-app-token@v1
7449
with:
75-
app_id: ${{ env.GH_APP_ID }}
76-
private_key: ${{ env.GH_PRIVATE_KEY }}
77-
installation_id: ${{ env.GH_INSTALLATION_ID }}
50+
app_id: ${{ secrets.GH_APP_ID }}
51+
private_key: ${{ secrets.GH_PRIVATE_KEY }}
52+
installation_id: ${{ secrets.GH_INSTALLATION_ID }}
7853

7954
- name: "Run tests"
8055
uses: ugns/actions/github/slash-command-dispatch@1.0.0

.github/workflows/validate-codeowners.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,13 @@ jobs:
1616
- name: "Checkout source code at current commit"
1717
uses: actions/checkout@v3
1818

19-
# Collect necessary secrets from Vault
20-
- name: Vault Secrets
21-
uses: hashicorp/vault-action@v2.4.0
22-
with:
23-
url: ${{ secrets.VAULT_ADDR }}
24-
method: jwt
25-
role: github-actions
26-
path: github
27-
secrets: |
28-
secret/data/actions/github app_id | GH_APP_ID ;
29-
secret/data/actions/github installation_id | GH_INSTALLATION_ID ;
30-
secret/data/actions/github private_key | GH_PRIVATE_KEY
31-
3219
- name: Generate token
3320
id: generate_token
3421
uses: tibdex/github-app-token@v1
3522
with:
36-
app_id: ${{ env.GH_APP_ID }}
37-
private_key: ${{ env.GH_PRIVATE_KEY }}
38-
installation_id: ${{ env.GH_INSTALLATION_ID }}
23+
app_id: ${{ secrets.GH_APP_ID }}
24+
private_key: ${{ secrets.GH_PRIVATE_KEY }}
25+
installation_id: ${{ secrets.GH_INSTALLATION_ID }}
3926

4027
- uses: mszostok/codeowners-validator@v0.7.1
4128
if: github.event.pull_request.head.repo.full_name == github.repository

0 commit comments

Comments
 (0)