update references from master to main #1830
Workflow file for this run
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
name: 'Actions Workflow' | |
on: | |
workflow_dispatch: {} | |
pull_request: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'CHANGELOG.md' | |
- 'README.md' | |
jobs: | |
install-and-build: | |
name: Install and Build GHA | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: yarn | |
- run: yarn install | |
- run: yarn build | |
- uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
base: HEAD | |
filters: | | |
dist: | |
- 'dist/**' | |
- .github/workflows/** | |
- .github/test-stacks/** | |
- name: Upload artifacts | |
if: | |
steps.changes.outputs.dist == 'true' || github.event_name == | |
'workflow_dispatch' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
outputs: | |
changed: ${{ steps.changes.outputs.dist }} | |
test-install-only-without-removal-of-pre-installed-pulumi: | |
needs: install-and-build | |
if: | |
${{ needs.install-and-build.outputs.changed == 'true' || github.event_name | |
== 'workflow_dispatch' }} | |
runs-on: ${{ matrix.os }} | |
name: Install-only without removal of pre-installed Pulumi on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
# If no action is specified, just install. | |
- uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
config-map: '{name: {value: my-pet, secret: false}}' | |
- run: pulumi version | |
test-install-only: | |
needs: install-and-build | |
if: | |
${{ needs.install-and-build.outputs.changed == 'true' || github.event_name | |
== 'workflow_dispatch' }} | |
runs-on: ${{ matrix.os }} | |
name: Install-only on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Remove pre-installed Pulumi | |
shell: bash | |
env: | |
RUNNER_OS: ${{ matrix.os }} | |
run: | | |
EXT="" | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
EXT=".exe" | |
fi | |
if command -v "pulumi${EXT}"; then | |
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")") | |
echo "Deleting Pulumi" | |
rm -v "$PULUMI_INSTALL_DIR"/pulumi* | |
fi | |
- uses: actions/checkout@v4 | |
- name: Download dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
# If no action is specified, just install. | |
- uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
config-map: '{name: {value: my-pet, secret: false}}' | |
- run: pulumi version | |
test-dotnet-stack: | |
needs: install-and-build | |
if: | |
${{ needs.install-and-build.outputs.changed == 'true' || github.event_name | |
== 'workflow_dispatch' }} | |
runs-on: ${{ matrix.os }} | |
name: Dotnet ${{ matrix.command }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
command: [up, refresh, destroy, preview, output] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Remove pre-installed Pulumi | |
shell: bash | |
env: | |
RUNNER_OS: ${{ matrix.os }} | |
run: | | |
EXT="" | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
EXT=".exe" | |
fi | |
if command -v "pulumi${EXT}"; then | |
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")") | |
echo "Deleting Pulumi" | |
rm -v "$PULUMI_INSTALL_DIR"/pulumi* | |
fi | |
- uses: actions/checkout@v4 | |
- name: Download dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.x | |
- uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
upsert: true | |
stack-name: dev | |
work-dir: .github/test-stacks/dotnet | |
config-map: '{name: {value: my-pet, secret: false}}' | |
- name: Ensure Update Plan is Not Generated | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/dotnet | |
run: | | |
! test -f update-plan.json || exit 1 | |
- name: Run Pulumi Preview with Update Plan | |
if: matrix.command == 'preview' | |
uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
stack-name: dev | |
upsert: true | |
work-dir: .github/test-stacks/dotnet | |
config-map: '{name: {value: hostname, secret: false}}' | |
plan: update-plan.json | |
- name: Ensure Update Plan is Generated and Not Empty | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/dotnet | |
run: | | |
test -s update-plan.json | |
test-golang-stack: | |
needs: install-and-build | |
if: | |
${{ needs.install-and-build.outputs.changed == 'true' || github.event_name | |
== 'workflow_dispatch' }} | |
runs-on: ${{ matrix.os }} | |
name: Golang ${{ matrix.command }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
command: [up, refresh, destroy, preview, output] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Remove pre-installed Pulumi | |
shell: bash | |
env: | |
RUNNER_OS: ${{ matrix.os }} | |
run: | | |
EXT="" | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
EXT=".exe" | |
fi | |
if command -v "pulumi${EXT}"; then | |
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")") | |
echo "Deleting Pulumi" | |
rm -v "$PULUMI_INSTALL_DIR"/pulumi* | |
fi | |
- uses: actions/checkout@v4 | |
- name: Download dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 1.15.x | |
- uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
stack-name: dev | |
upsert: true | |
work-dir: .github/test-stacks/golang | |
config-map: '{name: {value: my-user-name, secret: false}}' | |
- name: Ensure Update Plan is Not Generated | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/golang | |
run: | | |
! test -f update-plan.json || exit 1 | |
- name: Run Pulumi Preview with Update Plan | |
if: matrix.command == 'preview' | |
uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
stack-name: dev | |
upsert: true | |
work-dir: .github/test-stacks/golang | |
config-map: '{name: {value: hostname, secret: false}}' | |
plan: update-plan.json | |
- name: Ensure Update Plan is Generated and Not Empty | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/golang | |
run: | | |
test -s update-plan.json | |
test-nodejs-stack: | |
needs: install-and-build | |
if: | |
${{ needs.install-and-build.outputs.changed == 'true' || github.event_name | |
== 'workflow_dispatch' }} | |
runs-on: ${{ matrix.os }} | |
name: NodeJS ${{ matrix.command }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
command: [up, refresh, destroy, preview, output] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Remove pre-installed Pulumi | |
shell: bash | |
env: | |
RUNNER_OS: ${{ matrix.os }} | |
run: | | |
EXT="" | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
EXT=".exe" | |
fi | |
if command -v "pulumi${EXT}"; then | |
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")") | |
echo "Deleting Pulumi" | |
rm -v "$PULUMI_INSTALL_DIR"/pulumi* | |
fi | |
- uses: actions/checkout@v4 | |
- name: Download dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- run: npm install | |
working-directory: .github/test-stacks/nodejs | |
- uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
stack-name: dev | |
upsert: true | |
work-dir: .github/test-stacks/nodejs | |
config-map: '{name: {value: hostname, secret: false}}' | |
- name: Ensure Update Plan is Not Generated | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/nodejs | |
run: | | |
! test -f update-plan.json || exit 1 | |
- name: Run Pulumi Preview with Update Plan | |
if: matrix.command == 'preview' | |
uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
stack-name: dev | |
upsert: true | |
work-dir: .github/test-stacks/nodejs | |
config-map: '{name: {value: hostname, secret: false}}' | |
plan: update-plan.json | |
- name: Ensure Update Plan is Generated and Not Empty | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/nodejs | |
run: | | |
test -s update-plan.json | |
test-python-stack: | |
needs: install-and-build | |
if: | |
${{ needs.install-and-build.outputs.changed == 'true' || github.event_name | |
== 'workflow_dispatch' }} | |
runs-on: ${{ matrix.os }} | |
name: Python ${{ matrix.command }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
command: [up, refresh, destroy, preview, output] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Remove pre-installed Pulumi | |
shell: bash | |
env: | |
RUNNER_OS: ${{ matrix.os }} | |
run: | | |
EXT="" | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
EXT=".exe" | |
fi | |
if command -v "pulumi${EXT}"; then | |
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")") | |
echo "Deleting Pulumi" | |
rm -v "$PULUMI_INSTALL_DIR"/pulumi* | |
fi | |
- uses: actions/checkout@v4 | |
- name: Download dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: actions/setup-python@v5.1.0 | |
with: | |
python-version: 3.9 | |
- uses: actions/cache@v4 | |
if: startsWith(runner.os, 'Linux') | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- uses: actions/cache@v4 | |
if: startsWith(runner.os, 'macOS') | |
with: | |
path: ~/Library/Caches/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- uses: actions/cache@v4 | |
if: startsWith(runner.os, 'Windows') | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- run: pip install -r requirements.txt | |
working-directory: .github/test-stacks/python | |
- uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
stack-name: dev | |
upsert: true | |
work-dir: .github/test-stacks/python | |
config-map: '{name: {value: hostname, secret: false}}' | |
- name: Ensure Update Plan is Not Generated | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/python | |
run: | | |
! test -f update-plan.json || exit 1 | |
- name: Run Pulumi Preview with Update Plan | |
if: matrix.command == 'preview' | |
uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: ${{ matrix.command }} | |
cloud-url: file://~ | |
stack-name: dev | |
upsert: true | |
work-dir: .github/test-stacks/python | |
config-map: '{name: {value: hostname, secret: false}}' | |
plan: update-plan.json | |
- name: Ensure Update Plan is Generated and Not Empty | |
shell: bash | |
if: matrix.command == 'preview' | |
working-directory: .github/test-stacks/python | |
run: | | |
test -s update-plan.json | |
test-generic-inputs: | |
needs: install-and-build | |
if: | |
${{ needs.install-and-build.outputs.changed == 'true' || github.event_name | |
== 'workflow_dispatch' }} | |
runs-on: ${{ matrix.os }} | |
name: Inputs on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
steps: | |
- name: Remove pre-installed Pulumi | |
shell: bash | |
env: | |
RUNNER_OS: ${{ matrix.os }} | |
run: | | |
EXT="" | |
if [ "$RUNNER_OS" == "Windows" ]; then | |
EXT=".exe" | |
fi | |
if command -v "pulumi${EXT}"; then | |
PULUMI_INSTALL_DIR=$(dirname "$(command -v "pulumi${EXT}")") | |
echo "Deleting Pulumi" | |
rm -v "$PULUMI_INSTALL_DIR"/pulumi* | |
fi | |
- uses: actions/checkout@v4 | |
- name: Download dist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- run: npm install | |
working-directory: .github/test-stacks/nodejs | |
- uses: ./ | |
env: | |
PULUMI_CONFIG_PASSPHRASE: not-a-secret | |
with: | |
command: up | |
cloud-url: file://~ | |
stack-name: dev | |
work-dir: .github/test-stacks/nodejs | |
upsert: true | |
refresh: true | |
config-map: '{name: {value: hostname, secret: false}}' |