Upgrade provider #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upgrade provider | |
on: | |
# upgrade-provider creates a PR per | |
# | |
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow | |
# | |
# only workflows triggered by workflow_dispatch (and repository_dispatch) may | |
# trigger additional workflow runs when using GITHUB_TOKEN. This means the | |
# required checks in ci.yaml will not run on PRs created by this workflow | |
# when triggered by schedule. | |
# | |
# schedule: | |
# - cron: '0 5 * * *' | |
# | |
# Also, there is no deduping/reusing of upgrade PRs, so the bot left | |
# unattended will generate garbage for humans to cleanup. | |
# | |
# In light of the above, just assume a human will manually trigger this | |
# workflow periodically. | |
workflow_dispatch: | |
jobs: | |
upgrade-provider: | |
name: upgrade-provider | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch --force --tags | |
- name: "Set up git identity" | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
cache-dependency-path: '**/go.sum' | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install pulumictl | |
uses: jaxxstorm/[email protected] | |
with: | |
repo: pulumi/pulumictl | |
- run: go install github.com/pulumi/upgrade-provider@main | |
- name: Run upgrade-provider | |
run: | | |
upgrade-provider ddn0/pulumi-rockset --kind=all --pr-assign 'ddn0' | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |