Skip to content

Commit 8c19259

Browse files
committed
Add pull request trigger and enhance GitHub App token generation in workflow
1 parent 844c5bc commit 8c19259

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/add-to-project.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,33 @@ on:
33
issues:
44
types:
55
- opened
6+
pull_request:
7+
types:
8+
- opened
9+
10+
permissions:
11+
contents: read
12+
id-token: write
13+
614
jobs:
715
add-to-project:
816
name: Add issue to project
917
runs-on: ubuntu-latest
1018
steps:
19+
- id: get-secrets
20+
uses: grafana/shared-workflows/actions/get-vault-secrets@main
21+
with:
22+
repo_secrets: |
23+
GITHUB_APP_ID=grafana-oss-big-tent:app-id
24+
GITHUB_APP_PRIVATE_KEY=grafana-oss-big-tent:private-key
25+
- name: Generate a token
26+
id: generate-token
27+
uses: actions/create-github-app-token@v1
28+
with:
29+
app-id: ${{ env.GITHUB_APP_ID }}
30+
private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }}
31+
owner: ${{ github.repository_owner }}
1132
- uses: actions/add-to-project@main
1233
with:
1334
project-url: https://github.com/orgs/grafana/projects/457
14-
github-token: ${{ secrets.ISSUE_COMMANDS_TOKEN }}
35+
github-token: ${{ steps.generate-token.outputs.token }}

0 commit comments

Comments
 (0)