Skip to content

Commit 3a2cc9d

Browse files
authored
Update GitHub Actions workflows. (#5659)
This PR was automatically generated by the update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt repo, from commit b92ef1a166f24a0288c0c4f6009b3d9633d3a614.
1 parent df45f46 commit 3a2cc9d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/upgrade-java.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ permissions:
2323
pull-requests: write
2424

2525
env:
26+
27+
# upgrade-provider calls into gh CLI tool to open PRs that uses GH_TOKEN env var, which is not obivous.
28+
# setting this correctly makes sure the PR has the correct owner and permissions work as expected.
29+
GH_TOKEN: ${{ secrets.PULUMI_PROVIDER_AUTOMATION_TOKEN || secrets.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }}
30+
2631
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2732

2833
jobs:
@@ -58,5 +63,6 @@ jobs:
5863
env:
5964
V: ${{inputs.version}}
6065
REPO: ${{github.repository}}
66+
GH_TOKEN: ${{env.GH_TOKEN}}
6167
run: |
6268
upgrade-provider "$REPO" --kind=java --java-version="$V"

0 commit comments

Comments
 (0)