diff --git a/.github/workflows/_test-negative.yml b/.github/workflows/_test-negative.yml index 7905da0..7df799b 100644 --- a/.github/workflows/_test-negative.yml +++ b/.github/workflows/_test-negative.yml @@ -20,7 +20,7 @@ jobs: continue-on-error: true steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 - uses: ./ id: current @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest needs: [test] steps: - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: 'false' actual: "${{ needs.test.outputs.result }}" diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml index b6eb52f..be9b8c9 100644 --- a/.github/workflows/branch.yml +++ b/.github/workflows/branch.yml @@ -22,5 +22,5 @@ permissions: jobs: github-action: - uses: cloudposse/.github/.github/workflows/shared-github-action.yml@main + uses: cloudposse/.github/.github/workflows/shared-github-action.yml@4a53bd425cde1afc149872e69632e99239ff3342 # main secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7013360..e2c60be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,5 +10,5 @@ permissions: jobs: github-action: - uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main + uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@4a53bd425cde1afc149872e69632e99239ff3342 # main secrets: inherit diff --git a/.github/workflows/test-matrix-2-levels.yml b/.github/workflows/test-matrix-2-levels.yml index 7d02219..4d9b3da 100644 --- a/.github/workflows/test-matrix-2-levels.yml +++ b/.github/workflows/test-matrix-2-levels.yml @@ -32,7 +32,7 @@ jobs: continue-on-error: true steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.event.pull_request.head.ref }} @@ -45,7 +45,7 @@ jobs: - name: add mock atmos to the path run: echo "./tests/fixtures" >> $GITHUB_PATH - - uses: cloudposse-github-actions/install-gh-releases@v1 + - uses: cloudposse-github-actions/install-gh-releases@33b15dbedceb0a3425d72f54a2300202d5c3418d # v1 with: cache: true config: |- @@ -66,18 +66,18 @@ jobs: runs-on: ubuntu-latest needs: [test] steps: - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '[{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-ue2-root","stack_slug":"core-ue2-root-datadog-integration","affected":"component"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-gbl-audit","stack_slug":"core-gbl-audit-datadog-integration","affected":"component"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-datadog-integration","spacelift_stack":"core-gbl-auto-datadog-integration","affected":"component"},{"component":"infrastructure-cplive-plat","component_type":"terraform","component_path":"components/terraform/spacelift","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-infrastructure-cplive-plat","spacelift_stack":"core-gbl-auto-infrastructure-cplive-plat","affected":"stack.vars"},{"component":"infrastructure-cplive-core","component_type":"terraform","component_path":"components/terraform/spacelift","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-infrastructure-cplive-core","spacelift_stack":"core-gbl-auto-infrastructure-cplive-core","affected":"stack.vars"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"plat-gbl-prod","stack_slug":"plat-gbl-prod-datadog-integration","spacelift_stack":"plat-gbl-prod-datadog-integration","affected":"component"}]' actual: "${{ needs.test.outputs.affected }}" - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '{"include":[' actual: "${{ needs.test.outputs.matrix }}" comparison: contains - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '{"include":[{"name":"core-audit","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"core-gbl-audit\",\"stack_slug\":\"core-gbl-audit-datadog-integration\",\"affected\":\"component\"}]}"},{"name":"core-auto","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"core-gbl-auto\",\"stack_slug\":\"core-gbl-auto-datadog-integration\",\"spacelift_stack\":\"core-gbl-auto-datadog-integration\",\"affected\":\"component\"},{\"component\":\"infrastructure-cplive-core\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/spacelift\",\"stack\":\"core-gbl-auto\",\"stack_slug\":\"core-gbl-auto-infrastructure-cplive-core\",\"spacelift_stack\":\"core-gbl-auto-infrastructure-cplive-core\",\"affected\":\"stack.vars\"},{\"component\":\"infrastructure-cplive-plat\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/spacelift\",\"stack\":\"core-gbl-auto\",\"stack_slug\":\"core-gbl-auto-infrastructure-cplive-plat\",\"spacelift_stack\":\"core-gbl-auto-infrastructure-cplive-plat\",\"affected\":\"stack.vars\"}]}"},{"name":"core-root","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"core-ue2-root\",\"stack_slug\":\"core-ue2-root-datadog-integration\",\"affected\":\"component\"}]}"},{"name":"plat-prod","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"plat-gbl-prod\",\"stack_slug\":\"plat-gbl-prod-datadog-integration\",\"spacelift_stack\":\"plat-gbl-prod-datadog-integration\",\"affected\":\"component\"}]}"}]}' actual: "${{ needs.test.outputs.matrix }}" diff --git a/.github/workflows/test-matrix-3-levels.yml b/.github/workflows/test-matrix-3-levels.yml index 58d830f..05cd53f 100644 --- a/.github/workflows/test-matrix-3-levels.yml +++ b/.github/workflows/test-matrix-3-levels.yml @@ -32,7 +32,7 @@ jobs: continue-on-error: true steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.event.pull_request.head.ref }} @@ -45,7 +45,7 @@ jobs: - name: add mock atmos to the path run: echo "./tests/fixtures" >> $GITHUB_PATH - - uses: cloudposse-github-actions/install-gh-releases@v1 + - uses: cloudposse-github-actions/install-gh-releases@33b15dbedceb0a3425d72f54a2300202d5c3418d # v1 with: cache: true config: |- @@ -66,18 +66,18 @@ jobs: runs-on: ubuntu-latest needs: [test] steps: - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '[{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-ue2-root","stack_slug":"core-ue2-root-datadog-integration","affected":"component"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-gbl-audit","stack_slug":"core-gbl-audit-datadog-integration","affected":"component"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-datadog-integration","spacelift_stack":"core-gbl-auto-datadog-integration","affected":"component"},{"component":"infrastructure-cplive-plat","component_type":"terraform","component_path":"components/terraform/spacelift","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-infrastructure-cplive-plat","spacelift_stack":"core-gbl-auto-infrastructure-cplive-plat","affected":"stack.vars"},{"component":"infrastructure-cplive-core","component_type":"terraform","component_path":"components/terraform/spacelift","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-infrastructure-cplive-core","spacelift_stack":"core-gbl-auto-infrastructure-cplive-core","affected":"stack.vars"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"plat-gbl-prod","stack_slug":"plat-gbl-prod-datadog-integration","spacelift_stack":"plat-gbl-prod-datadog-integration","affected":"component"}]' actual: "${{ needs.test.outputs.affected }}" - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '{"include":[' actual: "${{ needs.test.outputs.matrix }}" comparison: contains - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '{"include":[{"name":"core-audit","items":"{\"include\":[{\"name\":\"core-gbl-audit-datadog-integration - core-gbl-audit-datadog-integration\",\"items\":\"{\\\"include\\\":[{\\\"component\\\":\\\"datadog-integration\\\",\\\"component_type\\\":\\\"terraform\\\",\\\"component_path\\\":\\\"components/terraform/datadog-integration\\\",\\\"stack\\\":\\\"core-gbl-audit\\\",\\\"stack_slug\\\":\\\"core-gbl-audit-datadog-integration\\\",\\\"affected\\\":\\\"component\\\"}]}\"}]}"},{"name":"core-auto","items":"{\"include\":[{\"name\":\"core-gbl-auto-datadog-integration - core-gbl-auto-infrastructure-cplive-plat\",\"items\":\"{\\\"include\\\":[{\\\"component\\\":\\\"datadog-integration\\\",\\\"component_type\\\":\\\"terraform\\\",\\\"component_path\\\":\\\"components/terraform/datadog-integration\\\",\\\"stack\\\":\\\"core-gbl-auto\\\",\\\"stack_slug\\\":\\\"core-gbl-auto-datadog-integration\\\",\\\"spacelift_stack\\\":\\\"core-gbl-auto-datadog-integration\\\",\\\"affected\\\":\\\"component\\\"},{\\\"component\\\":\\\"infrastructure-cplive-core\\\",\\\"component_type\\\":\\\"terraform\\\",\\\"component_path\\\":\\\"components/terraform/spacelift\\\",\\\"stack\\\":\\\"core-gbl-auto\\\",\\\"stack_slug\\\":\\\"core-gbl-auto-infrastructure-cplive-core\\\",\\\"spacelift_stack\\\":\\\"core-gbl-auto-infrastructure-cplive-core\\\",\\\"affected\\\":\\\"stack.vars\\\"},{\\\"component\\\":\\\"infrastructure-cplive-plat\\\",\\\"component_type\\\":\\\"terraform\\\",\\\"component_path\\\":\\\"components/terraform/spacelift\\\",\\\"stack\\\":\\\"core-gbl-auto\\\",\\\"stack_slug\\\":\\\"core-gbl-auto-infrastructure-cplive-plat\\\",\\\"spacelift_stack\\\":\\\"core-gbl-auto-infrastructure-cplive-plat\\\",\\\"affected\\\":\\\"stack.vars\\\"}]}\"}]}"},{"name":"core-root","items":"{\"include\":[{\"name\":\"core-ue2-root-datadog-integration - core-ue2-root-datadog-integration\",\"items\":\"{\\\"include\\\":[{\\\"component\\\":\\\"datadog-integration\\\",\\\"component_type\\\":\\\"terraform\\\",\\\"component_path\\\":\\\"components/terraform/datadog-integration\\\",\\\"stack\\\":\\\"core-ue2-root\\\",\\\"stack_slug\\\":\\\"core-ue2-root-datadog-integration\\\",\\\"affected\\\":\\\"component\\\"}]}\"}]}"},{"name":"plat-prod","items":"{\"include\":[{\"name\":\"plat-gbl-prod-datadog-integration - plat-gbl-prod-datadog-integration\",\"items\":\"{\\\"include\\\":[{\\\"component\\\":\\\"datadog-integration\\\",\\\"component_type\\\":\\\"terraform\\\",\\\"component_path\\\":\\\"components/terraform/datadog-integration\\\",\\\"stack\\\":\\\"plat-gbl-prod\\\",\\\"stack_slug\\\":\\\"plat-gbl-prod-datadog-integration\\\",\\\"spacelift_stack\\\":\\\"plat-gbl-prod-datadog-integration\\\",\\\"affected\\\":\\\"component\\\"}]}\"}]}"}]}' actual: "${{ needs.test.outputs.matrix }}" diff --git a/.github/workflows/test-no-changes.yml b/.github/workflows/test-no-changes.yml index f6cc950..19e4429 100644 --- a/.github/workflows/test-no-changes.yml +++ b/.github/workflows/test-no-changes.yml @@ -32,7 +32,7 @@ jobs: continue-on-error: true steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.event.pull_request.head.ref }} @@ -43,7 +43,7 @@ jobs: sed -i -e 's#__PLAN_ROLE__#${{ secrets.TERRAFORM_PLAN_ROLE }}#g' ${{ runner.temp }}/atmos.yaml sed -i -e 's#base_path: "./tests"#base_path: "${{ github.workspace }}/tests"#g' ${{ runner.temp }}/atmos.yaml - - uses: cloudposse-github-actions/install-gh-releases@v1 + - uses: cloudposse-github-actions/install-gh-releases@33b15dbedceb0a3425d72f54a2300202d5c3418d # v1 with: cache: true config: |- @@ -64,12 +64,12 @@ jobs: runs-on: ubuntu-latest needs: [test] steps: - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '[]' actual: "${{ needs.test.outputs.affected }}" - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: 'false' actual: "${{ needs.test.outputs.has-affected-stacks }}" diff --git a/.github/workflows/test-positive.yml b/.github/workflows/test-positive.yml index afae36a..255ba60 100644 --- a/.github/workflows/test-positive.yml +++ b/.github/workflows/test-positive.yml @@ -32,7 +32,7 @@ jobs: continue-on-error: true steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 with: ref: ${{ github.event.pull_request.head.ref }} @@ -45,7 +45,7 @@ jobs: - name: add mock atmos to the path run: echo "./tests/fixtures" >> $GITHUB_PATH - - uses: cloudposse-github-actions/install-gh-releases@v1 + - uses: cloudposse-github-actions/install-gh-releases@33b15dbedceb0a3425d72f54a2300202d5c3418d # v1 with: cache: true config: |- @@ -65,18 +65,18 @@ jobs: runs-on: ubuntu-latest needs: [test] steps: - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '[{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-ue2-root","stack_slug":"core-ue2-root-datadog-integration","affected":"component"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-gbl-audit","stack_slug":"core-gbl-audit-datadog-integration","affected":"component"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-datadog-integration","spacelift_stack":"core-gbl-auto-datadog-integration","affected":"component"},{"component":"infrastructure-cplive-plat","component_type":"terraform","component_path":"components/terraform/spacelift","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-infrastructure-cplive-plat","spacelift_stack":"core-gbl-auto-infrastructure-cplive-plat","affected":"stack.vars"},{"component":"infrastructure-cplive-core","component_type":"terraform","component_path":"components/terraform/spacelift","stack":"core-gbl-auto","stack_slug":"core-gbl-auto-infrastructure-cplive-core","spacelift_stack":"core-gbl-auto-infrastructure-cplive-core","affected":"stack.vars"},{"component":"datadog-integration","component_type":"terraform","component_path":"components/terraform/datadog-integration","stack":"plat-gbl-prod","stack_slug":"plat-gbl-prod-datadog-integration","spacelift_stack":"plat-gbl-prod-datadog-integration","affected":"component"}]' actual: "${{ needs.test.outputs.affected }}" - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '{"include":[' actual: "${{ needs.test.outputs.matrix }}" comparison: contains - - uses: nick-fields/assert-action@v2 + - uses: nick-fields/assert-action@aa0067e01f0f6545c31755d6ca128c5a3a14f6bf # v2 with: expected: '{"include":[{"name":"core-audit","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"core-gbl-audit\",\"stack_slug\":\"core-gbl-audit-datadog-integration\",\"affected\":\"component\"}]}"},{"name":"core-auto","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"core-gbl-auto\",\"stack_slug\":\"core-gbl-auto-datadog-integration\",\"spacelift_stack\":\"core-gbl-auto-datadog-integration\",\"affected\":\"component\"},{\"component\":\"infrastructure-cplive-core\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/spacelift\",\"stack\":\"core-gbl-auto\",\"stack_slug\":\"core-gbl-auto-infrastructure-cplive-core\",\"spacelift_stack\":\"core-gbl-auto-infrastructure-cplive-core\",\"affected\":\"stack.vars\"},{\"component\":\"infrastructure-cplive-plat\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/spacelift\",\"stack\":\"core-gbl-auto\",\"stack_slug\":\"core-gbl-auto-infrastructure-cplive-plat\",\"spacelift_stack\":\"core-gbl-auto-infrastructure-cplive-plat\",\"affected\":\"stack.vars\"}]}"},{"name":"core-root","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"core-ue2-root\",\"stack_slug\":\"core-ue2-root-datadog-integration\",\"affected\":\"component\"}]}"},{"name":"plat-prod","items":"{\"include\":[{\"component\":\"datadog-integration\",\"component_type\":\"terraform\",\"component_path\":\"components/terraform/datadog-integration\",\"stack\":\"plat-gbl-prod\",\"stack_slug\":\"plat-gbl-prod-datadog-integration\",\"spacelift_stack\":\"plat-gbl-prod-datadog-integration\",\"affected\":\"component\"}]}"}]}' actual: "${{ needs.test.outputs.matrix }}" diff --git a/action.yml b/action.yml index 75e2e73..9695e5f 100644 --- a/action.yml +++ b/action.yml @@ -107,16 +107,16 @@ runs: using: "composite" steps: - name: Install Node - uses: actions/setup-node@v6 + uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6 with: node-version: 24 - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 if: ${{ inputs.skip-checkout != 'true' }} with: ref: ${{ inputs.head-ref }} - - uses: cloudposse-github-actions/install-gh-releases@v1 + - uses: cloudposse-github-actions/install-gh-releases@33b15dbedceb0a3425d72f54a2300202d5c3418d # v1 if: ${{ inputs.install-jq == 'true' }} with: cache: true @@ -149,13 +149,13 @@ runs: - name: Install Terraform if: ${{ steps.config.outputs.terraform-version != '' && steps.config.outputs.terraform-version != 'null' }} - uses: hashicorp/setup-terraform@v4 + uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4 with: terraform_version: ${{ steps.config.outputs.terraform-version }} terraform_wrapper: false - name: Install OpenTofu - uses: cloudposse-github-actions/install-gh-releases@v1 + uses: cloudposse-github-actions/install-gh-releases@33b15dbedceb0a3425d72f54a2300202d5c3418d # v1 if: ${{ steps.config.outputs.opentofu-version != '' && steps.config.outputs.opentofu-version != 'null' }} with: cache: true @@ -165,7 +165,7 @@ runs: # atmos describe affected requires the main branch of the git repo to be present on disk so it can compare the # current branch to it to determine the affected stacks. This is different from a file-based git diff in that we # look at the contents of the stack files to determine if any have changed. - - uses: actions/checkout@v6 + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 if: ${{ inputs.skip-checkout != 'true' }} with: ref: ${{ inputs.default-branch }} @@ -194,7 +194,7 @@ runs: steps.config.outputs.aws-region != 'null' && steps.config.outputs.terraform-plan-role != '' && steps.config.outputs.terraform-plan-role != 'null' }} - uses: aws-actions/configure-aws-credentials@v6 + uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6 with: aws-region: ${{ steps.config.outputs.aws-region }} role-to-assume: ${{ steps.config.outputs.terraform-plan-role }} @@ -289,7 +289,7 @@ runs: run: |- cat "${GITHUB_ACTION_PATH}/assets/summary.md" >> $GITHUB_STEP_SUMMARY - - uses: cloudposse/github-action-matrix-extended@v0 + - uses: cloudposse/github-action-matrix-extended@5e66a04f8e0e6532dd8248954677d5038955b690 # v0 id: matrix if: ${{ inputs.atmos-pro-upload == 'false' }} with: