generated from pulumi/pulumi-tf-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal] Update GitHub Actions workflow files
- Loading branch information
1 parent
3022beb
commit 62d72ed
Showing
12 changed files
with
288 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Download binary assets | ||
description: Downloads the provider and tfgen binaries to `bin/`. | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download provider + tfgen binaries | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: xyz-provider.tar.gz | ||
path: ${{ github.workspace }}/bin | ||
- name: Untar provider binaries | ||
shell: bash | ||
run: | | ||
tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin | ||
find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Download SDK asset | ||
description: Restores the SDK asset for a language. | ||
|
||
inputs: | ||
language: | ||
required: true | ||
description: One of nodejs, python, dotnet, go, java | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Download ${{ inputs.language }} SDK | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ inputs.language }}-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/ | ||
- name: Uncompress SDK folder | ||
shell: bash | ||
run: tar -zxf ${{ github.workspace }}/sdk/${{ inputs.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ inputs.language }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Upload bin assets | ||
description: Uploads the provider and tfgen binaries to `bin/`. | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Tar provider binaries | ||
shell: bash | ||
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-xyz pulumi-tfgen-xyz | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: xyz-provider.tar.gz | ||
path: ${{ github.workspace }}/bin/provider.tar.gz | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Upload SDK asset | ||
description: Upload the SDK for a specific language as an asset for the workflow. | ||
|
||
inputs: | ||
language: | ||
required: true | ||
description: One of nodejs, python, dotnet, go, java | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Compress SDK folder | ||
shell: bash | ||
run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} . | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.language }}-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,61 +89,15 @@ jobs: | |
- prerequisites | ||
- test | ||
- license_check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/[email protected] | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
swap-storage: false | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Setup tools | ||
uses: ./.github/actions/setup-tools | ||
with: | ||
tools: pulumictl, pulumicli, go | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-region: us-east-2 | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
role-duration-seconds: 7200 | ||
role-external-id: upload-pulumi-release | ||
role-session-name: xyz@githubActions | ||
role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
env: | ||
GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} | ||
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} | ||
with: | ||
args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout | ||
60m0s | ||
version: latest | ||
|
||
publish_sdk: | ||
name: publish_sdk | ||
needs: | ||
- prerequisites | ||
- publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Publish SDKs | ||
uses: pulumi/[email protected] | ||
with: | ||
sdk: all | ||
version: ${{ needs.prerequisites.outputs.version }} | ||
dotnet-version: "6.0.x" | ||
java-version: "11" | ||
node-version: "20.x" | ||
python-version: "3.11.8" | ||
uses: ./.github/workflows/publish.yml | ||
secrets: inherit | ||
with: | ||
version: ${{ needs.prerequisites.outputs.version }} | ||
isPrerelease: false | ||
|
||
tag_release_if_labeled_needs_release: | ||
name: Tag release if labeled as needs-release | ||
needs: publish_sdk | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check if this commit needs release | ||
|
@@ -176,26 +130,13 @@ jobs: | |
uses: ./.github/actions/setup-tools | ||
with: | ||
tools: pulumictl, pulumicli, go, node, dotnet, python, java | ||
- name: Download provider + tfgen binaries | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: xyz-provider.tar.gz | ||
path: ${{ github.workspace }}/bin | ||
- name: Untar provider binaries | ||
run: >- | ||
tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ | ||
github.workspace}}/bin | ||
find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; | ||
- name: Download bin | ||
uses: ./.github/actions/download-bin | ||
- run: dotnet nuget add source ${{ github.workspace }}/nuget | ||
- name: Download SDK | ||
uses: actions/download-artifact@v4 | ||
uses: ./.github/actions/download-sdk | ||
with: | ||
name: ${{ matrix.language }}-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/ | ||
- name: Uncompress SDK folder | ||
run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ | ||
github.workspace }}/sdk/${{ matrix.language }} | ||
language: ${{ matrix.language }} | ||
- name: Update path | ||
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" | ||
- name: Install Python deps | ||
|
@@ -223,6 +164,7 @@ jobs: | |
- java | ||
name: master | ||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- master | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,87 +52,12 @@ jobs: | |
- prerequisites | ||
- test | ||
- license_check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/[email protected] | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: false | ||
swap-storage: false | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Setup tools | ||
uses: ./.github/actions/setup-tools | ||
with: | ||
tools: pulumictl, pulumicli, go | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-region: us-east-2 | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
role-duration-seconds: 7200 | ||
role-external-id: upload-pulumi-release | ||
role-session-name: xyz@githubActions | ||
role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
env: | ||
GORELEASER_CURRENT_TAG: v${{ needs.prerequisites.outputs.version }} | ||
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }} | ||
with: | ||
args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout | ||
60m0s | ||
version: latest | ||
publish_sdk: | ||
name: publish_sdk | ||
needs: | ||
- prerequisites | ||
- publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Publish SDKs | ||
uses: pulumi/[email protected] | ||
with: | ||
sdk: all | ||
version: ${{ needs.prerequisites.outputs.version }} | ||
dotnet-version: "6.0.x" | ||
java-version: "11" | ||
node-version: "20.x" | ||
python-version: "3.11.8" | ||
publish_go_sdk: | ||
name: publish_go_sdk | ||
needs: | ||
- prerequisites | ||
- publish_sdk | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Download Go SDK | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: go-sdk.tar.gz | ||
path: ${{ github.workspace }}/sdk/ | ||
- name: Uncompress Go SDK | ||
run: tar -zxf ${{ github.workspace }}/sdk/go.tar.gz -C | ||
${{ github.workspace }}/sdk/go | ||
shell: bash | ||
- uses: pulumi/publish-go-sdk-action@v1 | ||
with: | ||
repository: ${{ github.repository }} | ||
base-ref: ${{ github.sha }} | ||
source: sdk | ||
path: sdk | ||
version: ${{ needs.prerequisites.outputs.version }} | ||
additive: false | ||
# Avoid including other language SDKs & artifacts in the commit | ||
files: | | ||
go.* | ||
go/** | ||
!*.tar.gz | ||
uses: ./.github/workflows/publish.yml | ||
secrets: inherit | ||
with: | ||
version: ${{ needs.prerequisites.outputs.version }} | ||
isPrerelease: true | ||
|
||
test: | ||
name: test | ||
needs: | ||
|
@@ -151,26 +76,13 @@ jobs: | |
uses: ./.github/actions/setup-tools | ||
with: | ||
tools: pulumictl, pulumicli, go, node, dotnet, python, java | ||
- name: Download provider + tfgen binaries | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: xyz-provider.tar.gz | ||
path: ${{ github.workspace }}/bin | ||
- name: Untar provider binaries | ||
run: >- | ||
tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ | ||
github.workspace}}/bin | ||
find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \; | ||
- name: Download bin | ||
uses: ./.github/actions/download-bin | ||
- run: dotnet nuget add source ${{ github.workspace }}/nuget | ||
- name: Download SDK | ||
uses: actions/download-artifact@v4 | ||
uses: ./.github/actions/download-sdk | ||
with: | ||
name: ${{ matrix.language }}-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/ | ||
- name: Uncompress SDK folder | ||
run: tar -zxf ${{ github.workspace }}/sdk/${{ matrix.language }}.tar.gz -C ${{ | ||
github.workspace }}/sdk/${{ matrix.language }} | ||
language: ${{ matrix.language }} | ||
- name: Update path | ||
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" | ||
- name: Install Python deps | ||
|
@@ -196,19 +108,6 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
verify-release: | ||
name: verify-release | ||
needs: | ||
- prerequisites | ||
- publish | ||
- publish_sdk | ||
- publish_go_sdk | ||
uses: ./.github/workflows/verify-release.yml | ||
secrets: inherit | ||
with: | ||
providerVersion: ${{ needs.prerequisites.outputs.version }} | ||
# Prelease is run often but we only have 5 concurrent macos runners, so we only test after the stable release. | ||
enableMacosRunner: false | ||
|
||
name: prerelease | ||
on: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.