-
Notifications
You must be signed in to change notification settings - Fork 334
49 lines (48 loc) · 1.73 KB
/
pr-gh-project-processor.yaml
File metadata and controls
49 lines (48 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: gh-project-integration-processor
on:
# Trigger when the PR workflow completes
workflow_run:
workflows: [gh-project-integration]
types:
- completed
jobs:
rancher_gh_project:
permissions:
actions: read
issues: write
pull-requests: write
repository-projects: write
id-token: write
if: ${{ github.repository_owner == 'rancher' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Use Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version-file: '.nvmrc'
- name: Read secrets
uses: rancher-eio/read-vault-secrets@0da85151ad1f19ed7986c41587e45aac1ace74b6 # v3
with:
secrets: |
secret/data/github/repo/${{ github.repository }}/github/app-credentials appId | APP_ID ;
secret/data/github/repo/${{ github.repository }}/github/app-credentials privateKey | APP_PEM
- name: Generate Token
id: generate-token
uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.APP_PEM }}
- name: Download artifact
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6
with:
name: pr-gh-project-event
path: pr-gh-project-event/
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ github.token }}
- name: script
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
PR_PROJECT: ${{ secrets.PR_PROJECT }}
GITHUB_EVENT_PATH: pr-gh-project-event/event.json
run: node .github/workflows/scripts/pr-gh-project.js