-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b897d0
commit 7f107cd
Showing
7 changed files
with
132 additions
and
102 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 |
---|---|---|
@@ -1,78 +1,89 @@ | ||
--- | ||
name: Install Dependencies | ||
description: Ensures an action has the appropiate non .NET dependencies installed | ||
|
||
inputs: | ||
rust: | ||
description: 'Install rust toolchain ("true" or "false")' | ||
required: false | ||
default: "false" | ||
azure: | ||
description: 'Install azure functions tool chain ("true" or "false")' | ||
required: false | ||
default: "false" | ||
tc-cloud: | ||
description: 'Bootstrap TestContainers Cloud (TOKEN or "false")' | ||
required: false | ||
default: "false" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
# RUST | ||
- name: Rustup | ||
if: "${{ inputs.rust == 'true' }}" | ||
shell: bash | ||
run: rustup default 1.69.0 | ||
|
||
# - name: Cargo make | ||
# if: "${{ inputs.rust == 'true' }}" | ||
# shell: bash | ||
# run: cargo install --force cargo-make | ||
|
||
- name: Install cargo-make using cache | ||
if: "${{ inputs.rust == 'true' }}" | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: cargo-make | ||
version: "^0.36.8" | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
if: "${{ inputs.rust == 'true' }}" | ||
with: | ||
cache-targets: "false" | ||
cache-all-crates: "true" | ||
|
||
name: Install Dependencies | ||
description: Ensures an action has the appropiate non .NET dependencies installed | ||
|
||
inputs: | ||
rust: | ||
description: 'Install rust toolchain ("true" or "false")' | ||
required: false | ||
default: "false" | ||
azure: | ||
description: 'Install azure functions tool chain ("true" or "false")' | ||
required: false | ||
default: "false" | ||
tc-cloud: | ||
description: 'Bootstrap TestContainers Cloud (TOKEN or "false")' | ||
required: false | ||
default: "false" | ||
|
||
# AZURE | ||
- name: 'Linux: Azure functions core tools' | ||
if: "${{ inputs.azure == 'true' && runner.os == 'Linux' }}" | ||
shell: bash | ||
run: | | ||
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb | ||
sudo dpkg -i packages-microsoft-prod.deb | ||
sudo apt-get update | ||
sudo apt-get install azure-functions-core-tools-4 | ||
runs: | ||
using: "composite" | ||
steps: | ||
# ZIG | ||
- name: Zig | ||
if: "${{ inputs.rust == 'true' && runner.os == 'Linux' }}" | ||
shell: bash | ||
run: sudo snap install zig --beta --classic | ||
|
||
# RUST | ||
- name: Rustup | ||
if: "${{ inputs.rust == 'true' }}" | ||
shell: bash | ||
run: rustup default 1.79.0 | ||
|
||
# - name: Cargo make | ||
# if: "${{ inputs.rust == 'true' }}" | ||
# shell: bash | ||
# run: cargo install --force cargo-make | ||
|
||
- name: Install cargo-make using cache | ||
if: "${{ inputs.rust == 'true' }}" | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: cargo-make | ||
version: "^0.36.8" | ||
|
||
- name: Install cargo zigbuild | ||
if: "${{ inputs.rust == 'true' && runner.os == 'Linux' }}" | ||
shell: bash | ||
run: cargo install --force cargo-zigbuild | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
if: "${{ inputs.rust == 'true' }}" | ||
with: | ||
cache-targets: "false" | ||
cache-all-crates: "true" | ||
|
||
# AZURE | ||
- name: 'Linux: Azure functions core tools' | ||
if: "${{ inputs.azure == 'true' && runner.os == 'Linux' }}" | ||
shell: bash | ||
run: | | ||
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb | ||
sudo dpkg -i packages-microsoft-prod.deb | ||
sudo apt-get update | ||
sudo apt-get install azure-functions-core-tools-4 | ||
- name: 'Windows: Azure functions core tools' | ||
if: "${{ inputs.azure == 'true' && runner.os == 'Windows' }}" | ||
shell: cmd | ||
run: choco install azure-functions-core-tools -y --no-progress -r --version 4.0.4829 | ||
|
||
- name: 'Windows: Azure functions core tools' | ||
if: "${{ inputs.azure == 'true' && runner.os == 'Windows' }}" | ||
shell: cmd | ||
run: choco install azure-functions-core-tools -y --no-progress -r --version 4.0.4829 | ||
|
||
# TEST CONTAINERS CLOUD | ||
# If no PR event or if a PR event that's caused by a non-fork and non dependabot actor | ||
- name: Setup TestContainers Cloud Client | ||
if: | | ||
inputs.tc-cloud != 'false' | ||
&& (github.event_name != 'pull_request' | ||
|| (github.event_name == 'pull_request' | ||
&& github.event.pull_request.head.repo.fork == false | ||
&& github.actor != 'dependabot[bot]' | ||
) | ||
) | ||
uses: atomicjar/testcontainers-cloud-setup-action@c335bdbb570ec7c48f72c7d450c077f0a002293e # v1.3.0 | ||
with: | ||
token: ${{ inputs.tc-cloud }} | ||
|
||
|
||
|
||
# TEST CONTAINERS CLOUD | ||
# If no PR event or if a PR event that's caused by a non-fork and non dependabot actor | ||
- name: Setup TestContainers Cloud Client | ||
if: | | ||
inputs.tc-cloud != 'false' | ||
&& (github.event_name != 'pull_request' | ||
|| (github.event_name == 'pull_request' | ||
&& github.event.pull_request.head.repo.fork == false | ||
&& github.actor != 'dependabot[bot]' | ||
) | ||
) | ||
uses: atomicjar/testcontainers-cloud-setup-action@c335bdbb570ec7c48f72c7d450c077f0a002293e # v1.3.0 | ||
with: | ||
token: ${{ inputs.tc-cloud }} | ||
|
||
|
||
|
||
|
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
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
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