Skip to content

Commit

Permalink
Update workflow to use secrets (rancher#10804)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac authored Apr 15, 2024
1 parent 3231fc1 commit 18cda70
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/pr-gh-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,31 @@ on:

jobs:
rancher_gh_project:
permissions:
issues: write
pull-requests: write
repository-projects: 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: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
PR_PROJECT: ${{ secrets.PR_PROJECT }}
run: node .github/workflows/scripts/pr-gh-project.js
run: node .github/workflows/scripts/pr-gh-project.js
2 changes: 1 addition & 1 deletion .github/workflows/scripts/pr-gh-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ async function processClosedAction() {
console.log(' Issue is tech debt/dev validate/qa none - ignoring');
} else {
// Put this in when we remove the Zube workflow
// A single workflow needs to re-open the issue after GH closes it
// A single workflow needs to re-open the issue after GH closes it
// console.log(' Waiting for Zube to mark the issue as done ...');

// // Output labels
Expand Down

0 comments on commit 18cda70

Please sign in to comment.