Skip to content

add config lookup to workflows #129

add config lookup to workflows

add config lookup to workflows #129

# TODO: Setup access to dai sandbox account
name: Test Reusable Workflows
on:
pull_request:
branches:
- main
jobs:
# Enable once we have access to dai sandbox account
test_terraform_deploy_basic:
uses: ./.github/workflows/tf-deploy-basic.yaml
with:
github_artifact_path: path/to/artifacts
aws_account_id: ${{ vars.aws_account_id }}
aws_region: ${{ vars.aws_region }}
aws_role_name: ${{ vars.aws_role_name }}
environment: sandbox
github_feedback: true
tf_deploy_override: true
tf_dir: tests/terraform
tf_vars: var1=value1,var2=value2
tf_version: 1.6.6
test_docker_build:
uses: ./.github/workflows/docker-build.yaml
with:
image_name: test-docker-build
docker_context: tests/docker
artifact_retention_days: 1
test_docker_build_push_ecr:
uses: ./.github/workflows/docker-build-push-ecr.yaml
with:
aws_account_id: ${{ vars.aws_account_id }}
aws_region: ${{ vars.aws_region }}
aws_role_name: ${{ vars.aws_role_name }}
image_name: test-docker-build-push
image_tag: ${{ github.head_ref }}
docker_context: tests/docker
docker_push: false
test_docker_build_push_ecr_no_image_tag:
uses: ./.github/workflows/docker-build-push-ecr.yaml
with:
aws_account_id: ${{ vars.aws_account_id }}
aws_region: ${{ vars.aws_region }}
aws_role_name: ${{ vars.aws_role_name }}
image_name: test-docker-build-push
docker_context: tests/docker
docker_push: false
test_docker_push_ecr:
needs: test_docker_build
uses: ./.github/workflows/docker-push-ecr.yaml
with:
aws_account_id: 911453050078
aws_region: us-east-1
aws_role_name: cicd-iac
image_name: test-docker-build
image_tag: ${{ github.sha }}
test_config_export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Config Export
id: config_export
uses: tx-pts-dai/[email protected]
with:
config_path: .github/config.yaml
environment: sandbox
- name: Output Config
run: echo "tf_state_bucket:${{ steps.config_export.outputs.tf_state_bucket }}"