Skip to content

Upgrade provider

Upgrade provider #721

# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi/ci-mgmt
name: Upgrade provider
on:
workflow_dispatch:
inputs:
version:
description: |
The version of the upstream provider to upgrade to, without the 'v' prefix
If no version is specified, it will be inferred from the upstream provider's release tags.
required: false
type: string
upgradeProviderVersion:
description: |
Version of upgrade-provider to use. This must be a valid git reference in the pulumi/upgrade-provider repo. Defaults to "main"
See https://go.dev/ref/mod#versions for valid versions. E.g. "v0.1.0", "main", "da25dec".
default: main
type: string
schedule:
# 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours.
- cron: 0 3 * * *
env:
ARM_ENVIRONMENT: public
ARM_LOCATION: westus2
PULUMI_API: https://api.pulumi-staging.io
PULUMI_GO_DEP_ROOT: ${{ github.workspace }}/..
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
PULUMI_MISSING_DOCS_ERROR: "true"
PULUMI_PULUMI_ENABLE_JOURNALING: "true"
TF_APPEND_USER_AGENT: pulumi
permissions:
contents: write
issues: write
pull-requests: write
id-token: write # For ESC secrets.
jobs:
upgrade_provider:
name: upgrade-provider
runs-on: ubuntu-latest
steps:
# Run as first step so we don't delete things that have just been installed
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
with:
tool-cache: false
swap-storage: false
dotnet: false
- name: Checkout Repo
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false # Conflicts with app auth token.
- env:
ESC_ACTION_ENVIRONMENT: github-secrets/${{ github.repository_owner }}-${{ github.event.repository.name }}
ESC_ACTION_EXPORT_ENVIRONMENT_VARIABLES: "false"
ESC_ACTION_OIDC_AUTH: "true"
ESC_ACTION_OIDC_ORGANIZATION: pulumi
ESC_ACTION_OIDC_REQUESTED_TOKEN_TYPE: urn:pulumi:token-type:access_token:organization
id: esc-secrets
name: Fetch secrets from ESC
uses: pulumi/esc-action@9eb774255b1a4afb7855678ae8d4a77359da0d9b
- uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
id: app-auth
with:
app-id: ${{ steps.esc-secrets.outputs.PULUMI_PROVIDER_AUTOMATION_APP_ID }}
private-key: ${{ steps.esc-secrets.outputs.PULUMI_PROVIDER_AUTOMATION_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Setup mise
uses: blampe/mise-action@blampe/plugins
env:
MISE_FETCH_REMOTE_VERSIONS_TIMEOUT: 30s
with:
version: 2026.1.1
github_token: ${{ steps.app-auth.outputs.token }}
plugin_install: https://github.com/pulumi/vfox-pulumi
# only saving the cache in the prerequisites job
cache_save: false
- name: Install upgrade-provider
run: go install github.com/pulumi/upgrade-provider@${{ inputs.upgradeProviderVersion || 'main' }}
shell: bash
- name: "Set up git identity"
run: |
git config --global user.name 'bot@pulumi.com'
git config --global user.email 'bot@pulumi.com'
shell: bash
- name: Create issues for new upstream version
if: inputs.version == ''
id: upstream_version
# This step outputs `latest_version` if there is a pending upgrade
run: upgrade-provider "$REPO" --kind=check-upstream-version
env:
REPO: ${{ github.repository }}
GH_TOKEN: ${{ steps.esc-secrets.outputs.PULUMI_PROVIDER_AUTOMATION_TOKEN || steps.esc-secrets.outputs.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }}
shell: bash
- name: Calculate target version
id: target_version
# Prefer the manually specified version if it exists
# upstream_version will be empty if the provider is up-to-date
run: echo "version=${{ github.event.inputs.version || steps.upstream_version.outputs.latest_version }}" >> "$GITHUB_OUTPUT"
shell: bash
- name: Call upgrade provider action
id: upgrade_provider
if: steps.target_version.outputs.version != ''
uses: pulumi/pulumi-upgrade-provider-action@12996503de2aaddd72c7426efc43331a8970894f # v0.0.19
with:
kind: provider
email: bot@pulumi.com
username: pulumi-bot
automerge: false
target-version: ${{ steps.target_version.outputs.version }}
allow-missing-docs: false
env:
GH_TOKEN: ${{ steps.esc-secrets.outputs.PULUMI_PROVIDER_AUTOMATION_TOKEN || steps.esc-secrets.outputs.PULUMI_BOT_TOKEN || secrets.GITHUB_TOKEN }}