Skip to content

Commit

Permalink
Disable triggering a release based on issue/pr labels (#1093)
Browse files Browse the repository at this point in the history
Summary of changes:

* Thirdparty providers do not have the Pulumi Bot active. Any workflow
step making use of it should be skipped if no such endpoint has been
defined.
* Providers need the `--repository` option set for `schema-tools` to
fetch the schema in the correct Github organization
  • Loading branch information
ringods authored Oct 4, 2024
1 parent 8a60afb commit 8137d9b
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/dotnet/*.csproj
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
runs-on: #{{ .Config.runner.default }}#
steps:
- name: check if this commit needs release
if: ${{ env.RELEASE_BOT_ENDPOINT != '' }}
uses: pulumi/action-release-by-pr-label@main
with:
command: "release-if-needed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
{
echo 'summary<<EOF'
if [[ "$LAST_VERSION" != "No stable release" ]]; then
schema-tools compare --provider="#{{ .Config.provider }}#" --old-commit="$LAST_VERSION" --new-commit="--local-path=provider/cmd/pulumi-resource-#{{ .Config.provider }}#/schema.json"
schema-tools compare --provider="#{{ .Config.provider }}#" --old-commit="$LAST_VERSION" --repository="github://api.github.com/#{{ .Config.organization }}#" --new-commit="--local-path=provider/cmd/pulumi-resource-#{{ .Config.provider }}#/schema.json"
fi
echo 'EOF'
} >> "$GITHUB_OUTPUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/dotnet/*.csproj
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
Expand Down
1 change: 1 addition & 0 deletions provider-ci/test-providers/acme/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check if this commit needs release
if: ${{ env.RELEASE_BOT_ENDPOINT != '' }}
uses: pulumi/action-release-by-pr-label@main
with:
command: "release-if-needed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
{
echo 'summary<<EOF'
if [[ "$LAST_VERSION" != "No stable release" ]]; then
schema-tools compare --provider="acme" --old-commit="$LAST_VERSION" --new-commit="--local-path=provider/cmd/pulumi-resource-acme/schema.json"
schema-tools compare --provider="acme" --old-commit="$LAST_VERSION" --repository="github://api.github.com/pulumiverse" --new-commit="--local-path=provider/cmd/pulumi-resource-acme/schema.json"
fi
echo 'EOF'
} >> "$GITHUB_OUTPUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/dotnet/*.csproj
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check if this commit needs release
if: ${{ env.RELEASE_BOT_ENDPOINT != '' }}
uses: pulumi/action-release-by-pr-label@main
with:
command: "release-if-needed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
{
echo 'summary<<EOF'
if [[ "$LAST_VERSION" != "No stable release" ]]; then
schema-tools compare --provider="aws" --old-commit="$LAST_VERSION" --new-commit="--local-path=provider/cmd/pulumi-resource-aws/schema.json"
schema-tools compare --provider="aws" --old-commit="$LAST_VERSION" --repository="github://api.github.com/pulumi" --new-commit="--local-path=provider/cmd/pulumi-resource-aws/schema.json"
fi
echo 'EOF'
} >> "$GITHUB_OUTPUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/dotnet/*.csproj
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check if this commit needs release
if: ${{ env.RELEASE_BOT_ENDPOINT != '' }}
uses: pulumi/action-release-by-pr-label@main
with:
command: "release-if-needed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
{
echo 'summary<<EOF'
if [[ "$LAST_VERSION" != "No stable release" ]]; then
schema-tools compare --provider="cloudflare" --old-commit="$LAST_VERSION" --new-commit="--local-path=provider/cmd/pulumi-resource-cloudflare/schema.json"
schema-tools compare --provider="cloudflare" --old-commit="$LAST_VERSION" --repository="github://api.github.com/pulumi" --new-commit="--local-path=provider/cmd/pulumi-resource-cloudflare/schema.json"
fi
echo 'EOF'
} >> "$GITHUB_OUTPUT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
with:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/dotnet/*.csproj
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: check if this commit needs release
if: ${{ env.RELEASE_BOT_ENDPOINT != '' }}
uses: pulumi/action-release-by-pr-label@main
with:
command: "release-if-needed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
{
echo 'summary<<EOF'
if [[ "$LAST_VERSION" != "No stable release" ]]; then
schema-tools compare --provider="docker" --old-commit="$LAST_VERSION" --new-commit="--local-path=provider/cmd/pulumi-resource-docker/schema.json"
schema-tools compare --provider="docker" --old-commit="$LAST_VERSION" --repository="github://api.github.com/pulumi" --new-commit="--local-path=provider/cmd/pulumi-resource-docker/schema.json"
fi
echo 'EOF'
} >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 8137d9b

Please sign in to comment.