-
Notifications
You must be signed in to change notification settings - Fork 261
36 lines (35 loc) · 1.08 KB
/
pr-gh-project.yaml
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
name: gh-project-integration
on:
pull_request_target:
types: [ opened, reopened, edited, closed ]
jobs:
rancher_gh_project:
permissions:
issues: write
pull-requests: write
repository-projects: write
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Read secrets
uses: rancher-eio/read-vault-secrets@main
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@v1
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.APP_PEM }}
- name: script
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
PR_PROJECT: ${{ secrets.PR_PROJECT }}
run: node .github/workflows/scripts/pr-gh-project.js