initial commit
This commit is contained in:
28
.github/actions/download-prerequisites/action.yml
vendored
Normal file
28
.github/actions/download-prerequisites/action.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Download the code generator binary
|
||||
description: Downloads the code generator binary to `bin/`.
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Download the prerequisites bin
|
||||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
with:
|
||||
name: prerequisites-bin
|
||||
path: bin
|
||||
|
||||
- name: Restore executable permissions
|
||||
shell: bash
|
||||
run: chmod +x $(< bin/executables.txt)
|
||||
|
||||
- name: Remove executables list
|
||||
shell: bash
|
||||
run: rm bin/executables.txt
|
||||
|
||||
- name: Download schema-embed.json
|
||||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
with:
|
||||
# Use a pattern to avoid failing if the artifact doesn't exist
|
||||
pattern: schema-embed.*
|
||||
# Avoid creating directories for each artifact
|
||||
merge-multiple: true
|
||||
path: provider/cmd/pulumi-resource-xyz
|
||||
23
.github/actions/download-provider/action.yml
vendored
Normal file
23
.github/actions/download-provider/action.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Download the provider binary
|
||||
description: Downloads the provider binary to `bin/`.
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
- name: Download pulumi-resource-xyz
|
||||
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
with:
|
||||
pattern: pulumi-resource-xyz-*-linux-amd64.tar.gz
|
||||
path: ${{ github.workspace }}/bin
|
||||
merge-multiple: true
|
||||
|
||||
- name: Untar pulumi-resource-xyz
|
||||
shell: bash
|
||||
run: |
|
||||
tar -zxf ${{ github.workspace }}/bin/*amd64.tar.gz -C ${{ github.workspace}}/bin
|
||||
|
||||
- name: Mark pulumi-resource-xyz as executable
|
||||
shell: bash
|
||||
run: |
|
||||
find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \;
|
||||
19
.github/actions/download-sdk/action.yml
vendored
Normal file
19
.github/actions/download-sdk/action.yml
vendored
Normal file
@@ -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@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
|
||||
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 }}
|
||||
17
.github/actions/download-tfgen/action.yml
vendored
Normal file
17
.github/actions/download-tfgen/action.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: Download the tfgen binary
|
||||
description: Downloads the tfgen binary to `bin/`.
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
- name: Download pulumi-tfgen-xyz
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
name: pulumi-tfgen-xyz
|
||||
path: ${{ github.workspace }}/bin
|
||||
|
||||
- name: Ensure pulumi-tfgen-xyz is executable
|
||||
shell: bash
|
||||
run: |
|
||||
find ${{ github.workspace }} -name "pulumi-*-xyz" -print -exec chmod +x {} \;
|
||||
91
.github/actions/setup-tools/action.yml
vendored
Normal file
91
.github/actions/setup-tools/action.yml
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
name: Setup tools
|
||||
description: Installs Go, Pulumi, pulumictl, schema-tools, Node.JS, Python, dotnet and Java.
|
||||
|
||||
inputs:
|
||||
tools:
|
||||
description: |
|
||||
Comma separated list of tools to install. The default of "all" installs all tools. Available tools are:
|
||||
go
|
||||
pulumicli
|
||||
pulumictl
|
||||
schema-tools
|
||||
nodejs
|
||||
python
|
||||
dotnet
|
||||
java
|
||||
default: all
|
||||
cache-go:
|
||||
description: |
|
||||
Whether to enable the GitHub cache for Go. Appropriate for disabling in
|
||||
smaller jobs that typically completely before the "real" job has an
|
||||
opportunity to populate the cache.
|
||||
default: "true"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install Go
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'go')
|
||||
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
|
||||
with:
|
||||
go-version: "1.21.x"
|
||||
cache-dependency-path: |
|
||||
provider/*.sum
|
||||
upstream/*.sum
|
||||
sdk/go/*.sum
|
||||
sdk/*.sum
|
||||
*.sum
|
||||
# TODO(https://github.com/actions/setup-go/issues/316): Restore but don't save the cache.
|
||||
cache: ${{ inputs.cache-go }}
|
||||
|
||||
- name: Install pulumictl
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'pulumictl')
|
||||
uses: jaxxstorm/action-install-gh-release@4304621e8c48d66093a8a214af5d5b5bc3b3d943 # v2.0.0
|
||||
with:
|
||||
tag: v0.0.48
|
||||
repo: pulumi/pulumictl
|
||||
|
||||
- name: Install Pulumi CLI
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'pulumicli')
|
||||
uses: pulumi/actions@9519177da243fd32cab35cdbf19cce1ab7472fcc # v6
|
||||
with:
|
||||
pulumi-version: "dev"
|
||||
|
||||
- name: Install Schema Tools
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'schema-tools')
|
||||
uses: jaxxstorm/action-install-gh-release@4304621e8c48d66093a8a214af5d5b5bc3b3d943 # v2.0.0
|
||||
with:
|
||||
repo: pulumi/schema-tools
|
||||
|
||||
- name: Setup Node
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'nodejs')
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
registry-url: https://registry.npmjs.org
|
||||
|
||||
- name: Setup DotNet
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'dotnet')
|
||||
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||
with:
|
||||
dotnet-version: 8.0.x
|
||||
|
||||
- name: Setup Python
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'python')
|
||||
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
with:
|
||||
python-version: 3.11.8
|
||||
|
||||
- name: Setup Java
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'java')
|
||||
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
||||
with:
|
||||
cache: gradle
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
|
||||
- name: Setup Gradle
|
||||
if: inputs.tools == 'all' || contains(inputs.tools, 'java')
|
||||
uses: gradle/gradle-build-action@ac2d340dc04d9e1113182899e983b5400c17cda1 # v3
|
||||
with:
|
||||
gradle-version: 7.6
|
||||
15
.github/actions/upload-bin/action.yml
vendored
Normal file
15
.github/actions/upload-bin/action.yml
vendored
Normal file
@@ -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@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
||||
with:
|
||||
name: xyz-provider.tar.gz
|
||||
path: ${{ github.workspace }}/bin/provider.tar.gz
|
||||
retention-days: 30
|
||||
23
.github/actions/upload-prerequisites/action.yml
vendored
Normal file
23
.github/actions/upload-prerequisites/action.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Upload SDK asset
|
||||
description: Upload the SDK for a specific language as an asset for the workflow.
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Capture executable permissions
|
||||
shell: bash
|
||||
run: find bin -type f -executable > bin/executables.txt
|
||||
|
||||
- name: Upload prerequisites bin
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: prerequisites-bin
|
||||
path: bin/*
|
||||
retention-days: 30
|
||||
|
||||
- name: Upload schema-embed.json
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: schema-embed.json
|
||||
path: provider/cmd/pulumi-resource-xyz/schema-embed.json
|
||||
retention-days: 30
|
||||
20
.github/actions/upload-sdk/action.yml
vendored
Normal file
20
.github/actions/upload-sdk/action.yml
vendored
Normal file
@@ -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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: ${{ inputs.language }}-sdk.tar.gz
|
||||
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user