Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#373)
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 59792d5093b1b8122226758ee600ab8213370432.
  • Loading branch information
pulumi-bot authored Jun 28, 2024
1 parent fa70afb commit 842c38a
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 111 deletions.
16 changes: 16 additions & 0 deletions .github/actions/download-bin/action.yml
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: slack-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-*-slack" -print -exec chmod +x {} \;
19 changes: 19 additions & 0 deletions .github/actions/download-sdk/action.yml
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 }}
15 changes: 15 additions & 0 deletions .github/actions/upload-bin/action.yml
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-slack pulumi-tfgen-slack
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: slack-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
retention-days: 30
20 changes: 20 additions & 0 deletions .github/actions/upload-sdk/action.yml
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
23 changes: 5 additions & 18 deletions .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,8 @@ 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: slack-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-*-slack" -print -exec chmod +x {} \;
- name: Download bin
uses: ./.github/actions/download-bin
- name: Install plugins
run: make install_plugins
- name: Update path
Expand All @@ -79,11 +70,7 @@ jobs:
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
- name: Compress SDK folder
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} .
- name: Upload artifacts
uses: actions/upload-artifact@v4
- name: Upload SDK
uses: ./.github/actions/upload-sdk
with:
name: ${{ matrix.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz
retention-days: 30
language: ${{ matrix.language }}
33 changes: 11 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,17 @@ jobs:
- publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumicli, pulumictl, go, node, dotnet, python, java
- name: Publish SDKs
uses: pulumi/[email protected].18
uses: pulumi/[email protected].19
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"

tag_release_if_labeled_needs_release:
name: Tag release if labeled as needs-release
Expand Down Expand Up @@ -175,26 +177,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: slack-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-*-slack" -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
Expand Down
33 changes: 11 additions & 22 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,17 @@ jobs:
- publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumicli, pulumictl, go, node, dotnet, python, java
- name: Publish SDKs
uses: pulumi/[email protected].18
uses: pulumi/[email protected].19
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:
Expand Down Expand Up @@ -150,26 +152,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: slack-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-*-slack" -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
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,5 @@ jobs:
Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes.
- name: Tar provider binaries
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{
github.workspace }}/bin/ pulumi-resource-slack
pulumi-tfgen-slack
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: slack-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
retention-days: 30
- name: Upload bin
uses: ./.github/actions/upload-bin
33 changes: 11 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,17 @@ jobs:
- publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumicli, pulumictl, go, node, dotnet, python, java
- name: Publish SDKs
uses: pulumi/[email protected].18
uses: pulumi/[email protected].19
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:
Expand Down Expand Up @@ -183,26 +185,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: slack-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-*-slack" -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
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,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: slack-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-*-slack" -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
Expand Down

0 comments on commit 842c38a

Please sign in to comment.