fix: job identification in matrix with other jobs #172
Workflow file for this run
This file contains hidden or 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: Test CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: [action.yml, tests/fail*/**, tests/pass*/**, .github/workflows/test_ci.yaml] | |
types: [opened, reopened, synchronize, closed] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
name: Run Terraform actions | |
permissions: | |
actions: read # Required to identify workflow run. | |
checks: write # Required to add status summary. | |
contents: read # Required to checkout repository. | |
pull-requests: write # Required to add PR comment. | |
strategy: | |
fail-fast: false | |
matrix: | |
directory: | |
- lab/eu-west-1/123456789/004_vpc | |
- lab/eu-west-1/123456789/006_eks | |
- lab/eu-west-1/123456789/007_eks_addons | |
- lab/eu-west-1/123456789/008_app_roles | |
steps: | |
- name: Echo context | |
env: | |
GH_JSON: ${{ toJson(github) }} | |
run: echo "$GH_JSON" | |
- name: Checkout repository | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
with: | |
persist-credentials: false | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_version: latest | |
terraform_wrapper: false | |
- name: Provision TF | |
id: tf | |
uses: ./ | |
with: | |
working-directory: ${{ matrix.directory }} | |
arg-recursive: false | |
arg-lock: false | |
arg-get: true | |
command: plan | |
upload-plan: false | |
- name: Echo TF | |
continue-on-error: true | |
run: | | |
echo "check-id: ${{ steps.tf.outputs.check-id }}" | |
echo "command: ${{ steps.tf.outputs.command }}" | |
echo "comment-body:" | |
echo "comment-id: ${{ steps.tf.outputs.comment-id }}" | |
echo "diff: ${{ steps.tf.outputs.diff }}" | |
echo "exitcode: ${{ steps.tf.outputs.exitcode }}" | |
echo "identifier: ${{ steps.tf.outputs.identifier }}" | |
echo "job-id: ${{ steps.tf.outputs.job-id }}" | |
echo "plan-id: ${{ steps.tf.outputs.plan-id }}" | |
echo "plan-url: ${{ steps.tf.outputs.plan-url }}" | |
echo "result: ${{ steps.tf.outputs.result }}" | |
echo "run-url: ${{ steps.tf.outputs.run-url }}" | |
echo "summary: ${{ steps.tf.outputs.summary }}" |