92 lines
3.0 KiB
YAML
92 lines
3.0 KiB
YAML
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
|