File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ permissions : write-all # Equivalent to default permissions plus id-token: write
2+ name : Export secrets to ESC
3+ on : [workflow_dispatch]
4+ jobs :
5+ export-to-esc :
6+ runs-on : ubuntu-latest
7+ name : export GitHub secrets to ESC
8+ steps :
9+ - name : Generate a GitHub token
10+ id : generate-token
11+ uses : actions/create-github-app-token@v1
12+ with :
13+ app-id : 1256780 # Export Secrets GitHub App
14+ private-key : ${{ secrets.EXPORT_SECRETS_PRIVATE_KEY }}
15+ - name : Export secrets to ESC
16+ uses : pulumi/esc-export-secrets-action@v1
17+ with :
18+ organization : pulumi
19+ org-environment : imports/github-secrets
20+ exclude-secrets : EXPORT_SECRETS_PRIVATE_KEY
21+ github-token : ${{ steps.generate-token.outputs.token }}
22+ oidc-auth : true
23+ oidc-requested-token-type : urn:pulumi:token-type:access_token:organization
24+ env :
25+ GITHUB_SECRETS : ${{ toJSON(secrets) }}
Original file line number Diff line number Diff line change @@ -76,10 +76,14 @@ jobs:
7676 automerge : true
7777 target-version : ${{ steps.target_version.outputs.version }}
7878 allow-missing-docs : true
79+ env :
80+ GH_TOKEN : ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }}
7981 - name : Comment on upgrade issue if automated PR failed
8082 if : steps.upgrade_provider.outcome == 'failure'
8183 shell : bash
8284 run : |
8385 issue_number=$(gh issue list --search "pulumiupgradeproviderissue" --repo "${{ github.repository }}" --json=number --jq=".[0].number")
8486 gh issue comment "${issue_number}" --repo "${{ github.repository }}" --body "Failed to create automatic PR: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/"
87+ env :
88+ GH_TOKEN : ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }}
8589
You can’t perform that action at this time.
0 commit comments