feat: artifact support pattern and merge_multiple #215
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
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/_test-tf.yaml' | |
- '.github/workflows/tf-*.yaml' | |
- 'tests/terraform/**' | |
jobs: | |
test_tf_feature: | |
uses: ./.github/workflows/tf-feature.yaml | |
with: | |
environment: sandbox | |
tf_workspace: test/slash/replacement | |
test_tf_outputs: | |
needs: test_tf_feature | |
runs-on: ubuntu-latest | |
steps: | |
- name: Show Terraform Outputs | |
run: echo "${{ needs.test_tf_feature.outputs.tf_outputs }}" | |
test_tf_outputs_decode_random_pet: | |
needs: test_tf_feature | |
runs-on: ubuntu-latest | |
steps: | |
- name: Show random_pet output resource | |
run: echo "${{ fromJson(needs.test_tf_feature.outputs.tf_outputs).random_pet }}" | |
test_tf_plan: | |
uses: ./.github/workflows/tf-plan.yaml | |
with: | |
environment: sandbox | |
test_tf_apply: | |
uses: ./.github/workflows/tf-apply.yaml | |
with: | |
environment: sandbox | |
tf_pre_run: curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip -qq awscliv2.zip && ./aws/install | |
test_tf_cleanup: | |
needs: test_tf_apply | |
uses: ./.github/workflows/tf-cleanup.yaml | |
with: | |
environment: sandbox | |
tf_workspace: test/slash/replacement | |
test_tf_plan_no_environment: | |
uses: ./.github/workflows/tf-plan.yaml | |
with: | |
aws_account_id: 911453050078 | |
aws_region: eu-central-1 | |
aws_role_name: cicd-iac | |
tf_dir: tests/terraform/s3 | |
tf_backend_configs: | | |
bucket=tf-state-911453050078 | |
key=sandbox1.tfstate | |
workspace_key_prefix=github-workflows | |
tf_var_files: tests/terraform/s3/environment/sandbox.tfvars | |
test_upload_artifact: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: docker-artifacts | |
path: tests/docker-artifacts/artifact-sample.txt | |
test_tf_artifact: | |
needs: test_upload_artifact | |
uses: ./.github/workflows/tf-plan.yaml | |
with: | |
environment: sandbox | |
tf_dir: tests/terraform/artifact | |
gh_artifact_name: docker-artifacts | |
gh_artifact_path: tests/terraform/artifact/ | |
tf_vars: | | |
file_path="artifact-sample.txt" | |
test_tf_artifact_all: | |
needs: test_upload_artifact | |
uses: ./.github/workflows/tf-plan.yaml | |
with: | |
environment: sandbox | |
tf_dir: tests/terraform/artifact | |
gh_artifact_path: tests/terraform/artifact/ | |
tf_vars: | | |
file_path="docker-artifacts/artifact-sample.txt" | |
test_tf_checkout_ref: | |
uses: ./.github/workflows/tf-plan.yaml | |
with: | |
environment: sandbox | |
gh_checkout_ref: refs/heads/main | |
tf_dir: tests/terraform/s3 | |
tf_backend_configs: | | |
bucket=tf-state-911453050078 | |
key=sandbox-checkout-ref.tfstate | |
workspace_key_prefix=github-workflows | |
tf_var_files: tests/terraform/s3/environment/sandbox.tfvars |