Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#619)
Browse files Browse the repository at this point in the history
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit f3712fc20118361a28fd8acf25d5deb5ee8dbe15.
  • Loading branch information
pulumi-bot authored Nov 2, 2024
1 parent fe7e3a5 commit 64f8dde
Show file tree
Hide file tree
Showing 19 changed files with 81 additions and 50 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cache examples generation
uses: actions/cache@v4
with:
Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/check-upstream-upgrade.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: peter-evans/slash-command-dispatch@v4
with:
commands: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/community-moderation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- id: schema_changed
name: Check for diff in schema
uses: dorny/paths-filter@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install go
uses: actions/setup-go@v5
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
swap-storage: false
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down Expand Up @@ -134,6 +136,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- uses: pulumi/provider-version-action@v1
id: provider-version
with:
Expand Down Expand Up @@ -78,7 +80,7 @@ jobs:
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
{
echo "SCHEMA_CHANGES<<$EOF";
schema-tools compare -r github://api.github.com/pulumi -p confluentcloud -o ${{ inputs.default_branch }} -n --local-path=provider/cmd/pulumi-resource-confluentcloud/schema.json;
schema-tools compare -r github://api.github.com/pulumi -p confluentcloud -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-confluentcloud/schema.json;
echo "$EOF";
} >> "$GITHUB_ENV"
- if: inputs.is_pr && inputs.is_automated == false
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
run: echo "Can't skip Go SDK for stable releases. This is likely a bug in the calling workflow." && exit 1
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand All @@ -74,7 +76,7 @@ jobs:
merge-multiple: true
- name: Calculate checksums
working-directory: dist
run: shasum ./*.tar.gz > pulumi-confluentcloud_${{ inputs.version }}_checksums.txt
run: shasum ./*.tar.gz > "pulumi-confluentcloud_${{ inputs.version }}_checksums.txt"
- name: Get Schema Change Summary
id: schema-summary
shell: bash
Expand Down Expand Up @@ -111,6 +113,9 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# Persist credentials so we can push back to the repo
persist-credentials: true
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down Expand Up @@ -168,6 +173,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Clean up release labels
uses: pulumi/action-release-by-pr-label@main
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release_command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Should release PR
uses: pulumi/action-release-by-pr-label@main
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/resync-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# Persist credentials so we can push a new branch.
persist-credentials: true
- name: Checkout repo
uses: actions/checkout@v4
with:
path: ci-mgmt
repository: pulumi/ci-mgmt
persist-credentials: false
- id: run-url
name: Create URL to the run output
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ env.PR_COMMIT_SHA }}
persist-credentials: false
- name: Checkout p/examples
if: matrix.testTarget == 'pulumiExamples'
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/upgrade-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down
47 changes: 37 additions & 10 deletions .github/workflows/upgrade-provider.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,61 @@
# WARNING: This file is autogenerated - changes will be overwritten if not made via 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
schedule:
# 3 AM UTC ~ 8 PM PDT / 7 PM PST daily. Time chosen to run during off hours.
- cron: 0 3 * * *

env:
GH_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
upgrade_provider:
if: ${{ (github.event.issue.user.login == 'pulumi-bot' && contains(github.event.issue.title, 'Upgrade terraform-provider-')) || github.event_name == 'workflow_dispatch' }}
name: upgrade-provider
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# Persist credentials so upgrade-provider can push a new branch.
persist-credentials: true
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, nodejs, dotnet, python, java
- name: Install upgrade-provider
run: go install github.com/pulumi/upgrade-provider@main
shell: bash
- name: "Set up git identity: name"
- name: "Set up git identity"
run: |
git config --global user.name '[email protected]'
git config --global user.email '[email protected]'
shell: bash
- name: Run upgrade-provider
run: upgrade-provider "${{ github.repository }}" --kind="all"
- 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 }}
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: Attempt provider upgrade
# Only attempt the upgrade if we have a target version
if: steps.target_version.outputs.version != ''
run: upgrade-provider "${{ github.repository }}" --kind="all" --target-version="${{ steps.target_version.outputs.version }}"
shell: bash
name: Upgrade provider
on:
issues:
types:
- opened
workflow_dispatch: {}
2 changes: 2 additions & 0 deletions .github/workflows/verify-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
Expand Down

0 comments on commit 64f8dde

Please sign in to comment.