Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/check-upstream-upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# WARNING: This file was build based on https://github.com/pulumi/ci-mgmt
# but it is currently not in sync. Any update must be done manually

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
check_upgrade_provider:
name: Check for upstream provider upgrades
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: true
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: go
- name: Install upgrade-provider
run: go install github.com/pulumi/upgrade-provider@main
shell: bash
- name: "Set up git identity: name"
run: git config --global user.name GitHub
shell: bash
- name: "Set up git identity: email"
run: git config --global user.email noreply@github.com
shell: bash
- name: Run upgrade-provider upstream check
id: upstream_version
run: |
upgrade-provider "$REPO" --kind=check-upstream-version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm: the upgrade-provider command runs all necessary make tasks & patches and then opens a GitHub PR with the resulting changes?

@ocobles ocobles Jul 16, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly. This action executes it with kind=check-upstream-version, If a change is detected, it will create a new issue with the title "Upgrade terraform-provider-equinix to vX.Y.Z". That will trigger the upgrade-provider action

if: ${{ contains(github.event.issue.title, 'Upgrade terraform-provider-') || github.event_name == 'workflow_dispatch' }}
which internally also uses the upgrade-provider command but with the kind=all, this updates both the terraform provider, the bridge plugin and its dependencies

env:
REPO: ${{ github.repository }}
shell: bash
name: Check upstream upgrade
on:
workflow_dispatch: {} #so we can run this manually if necessary.
schedule:
# Run every 8 hours Monday through Friday
- cron: '0 */8 * * 1-5'