Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions workflows. #469

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
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
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 @@ -45,6 +45,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 @@ -27,6 +27,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 @@ -34,6 +34,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 @@ -34,6 +34,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/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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 @@ -139,6 +141,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 @@ -83,6 +83,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 @@ -47,6 +47,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 @@ -79,7 +81,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 splunk -o ${{ inputs.default_branch }} -n --local-path=provider/cmd/pulumi-resource-splunk/schema.json;
schema-tools compare -r github://api.github.com/pulumi -p splunk -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-splunk/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 @@ -50,6 +50,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 @@ -75,7 +77,7 @@ jobs:
merge-multiple: true
- name: Calculate checksums
working-directory: dist
run: shasum ./*.tar.gz > pulumi-splunk_${{ inputs.version }}_checksums.txt
run: shasum ./*.tar.gz > "pulumi-splunk_${{ inputs.version }}_checksums.txt"
- name: Get Schema Change Summary
id: schema-summary
shell: bash
Expand Down Expand Up @@ -112,6 +114,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 @@ -169,6 +174,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 @@ -28,6 +28,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 @@ -89,6 +89,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 @@ -29,11 +29,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 @@ -133,6 +133,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 @@ -73,6 +73,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
Loading