diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml new file mode 100644 index 000000000..b6eb52f83 --- /dev/null +++ b/.github/workflows/branch.yml @@ -0,0 +1,26 @@ +name: Branch +on: + pull_request: + branches: + - main + - release/** + types: [opened, synchronize, reopened] + push: + branches: + - main + - release/v* + paths-ignore: + - '.github/**' + - 'docs/**' + - 'examples/**' + - 'test/**' + - 'README.md' + +permissions: + contents: write + actions: write + +jobs: + github-action: + uses: cloudposse/.github/.github/workflows/shared-github-action.yml@main + secrets: inherit diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 5520e0a1a..19b79b4b7 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -40,4 +40,5 @@ jobs: with: component: "foobar" stack: "plat-ue2-sandbox" - atmos-config-path: ${{ runner.temp }} \ No newline at end of file + atmos-config-path: ${{ runner.temp }} + atmos-version: v1.72.0 diff --git a/.github/workflows/release-branch.yml b/.github/workflows/release-branch.yml deleted file mode 100644 index 852d5e3ea..000000000 --- a/.github/workflows/release-branch.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: release-branch -on: - push: - branches: - - main - - release/v* - paths-ignore: - - '.github/**' - - 'docs/**' - - 'examples/**' - - 'test/**' - - 'README.md' - -permissions: {} - -jobs: - terraform-module: - uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/release-branch.yml@main - secrets: inherit diff --git a/.github/workflows/release-published.yml b/.github/workflows/release-published.yml deleted file mode 100644 index 1b0aaca73..000000000 --- a/.github/workflows/release-published.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: release-published -on: - release: - types: - - published - -permissions: {} - -jobs: - terraform-module: - uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/release-published.yml@main - secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc8a75028..701336020 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,7 @@ ---- -name: release +name: Release on: release: - types: - - published + types: [published] permissions: id-token: write @@ -11,6 +9,6 @@ permissions: pull-requests: write jobs: - terraform-module: + github-action: uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main secrets: inherit diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml deleted file mode 100644 index 7bc09ab9d..000000000 --- a/.github/workflows/scheduled.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: scheduled -on: - workflow_dispatch: { } # Allows manually trigger this workflow - schedule: - - cron: "0 3 * * *" - -permissions: - pull-requests: write - id-token: write - contents: write - -jobs: - scheduled: - uses: cloudposse/github-actions-workflows-terraform-module/.github/workflows/scheduled.yml@main - secrets: inherit diff --git a/.github/workflows/test-changes-exists-drift.yml b/.github/workflows/test-changes-exists-drift.yml index d569a8059..dc529327c 100644 --- a/.github/workflows/test-changes-exists-drift.yml +++ b/.github/workflows/test-changes-exists-drift.yml @@ -47,7 +47,7 @@ jobs: with: component: "foobar/changes" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} drift-detection-mode-enabled: true atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 @@ -201,7 +201,7 @@ jobs: "component": "foobar/changes", "stack": "plat-ue2-sandbox", "componentPath": "tests/components/terraform/foobar", - "commitSHA": "da39a3ee5e6b4b0d3255bfef95601890afd80709" + "commitSHA": "${{ github.sha }}" } ``` diff --git a/.github/workflows/test-changes-exists.yml b/.github/workflows/test-changes-exists.yml index ae260fcea..67fb97868 100644 --- a/.github/workflows/test-changes-exists.yml +++ b/.github/workflows/test-changes-exists.yml @@ -46,7 +46,7 @@ jobs: with: component: "foobar/changes" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 diff --git a/.github/workflows/test-failed-plan-drift.yml b/.github/workflows/test-failed-plan-drift.yml index 461949da9..e62655cd1 100644 --- a/.github/workflows/test-failed-plan-drift.yml +++ b/.github/workflows/test-failed-plan-drift.yml @@ -47,7 +47,7 @@ jobs: with: component: "foobar-fail" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} drift-detection-mode-enabled: true atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 @@ -178,7 +178,7 @@ jobs: "component": "foobar-fail", "stack": "plat-ue2-sandbox", "componentPath": "tests/components/terraform/foobar", - "commitSHA": "da39a3ee5e6b4b0d3255bfef95601890afd80709" + "commitSHA": "${{ github.sha }}" } ``` diff --git a/.github/workflows/test-failed-plan.yml b/.github/workflows/test-failed-plan.yml index ca2656faf..34da249a6 100644 --- a/.github/workflows/test-failed-plan.yml +++ b/.github/workflows/test-failed-plan.yml @@ -47,7 +47,7 @@ jobs: with: component: "foobar-fail" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 diff --git a/.github/workflows/test-infra-cost.yml b/.github/workflows/test-infra-cost.yml index df2503304..92bc2cfc7 100644 --- a/.github/workflows/test-infra-cost.yml +++ b/.github/workflows/test-infra-cost.yml @@ -47,7 +47,7 @@ jobs: with: component: "foobar/changes" stack: "plat-ue2-sandbox" - sha: 55bfef95601890afd80709da39a3ee5e6b4b0d32 + sha: ${{ github.sha }} infracost-api-key: ${{ secrets.INFRACOST_API_KEY }} debug: true atmos-config-path: ${{ runner.temp }} diff --git a/.github/workflows/test-no-changes-drift-more.yml b/.github/workflows/test-no-changes-drift-more.yml index 945ea2eaa..49121f643 100644 --- a/.github/workflows/test-no-changes-drift-more.yml +++ b/.github/workflows/test-no-changes-drift-more.yml @@ -46,7 +46,7 @@ jobs: with: component: "foobar" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} drift-detection-mode-enabled: true atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 diff --git a/.github/workflows/test-no-changes.yml b/.github/workflows/test-no-changes.yml index 74c9c0bd9..6561495bf 100644 --- a/.github/workflows/test-no-changes.yml +++ b/.github/workflows/test-no-changes.yml @@ -46,7 +46,7 @@ jobs: with: component: "foobar" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 diff --git a/.github/workflows/test-settings-action-disabled-drift.yml b/.github/workflows/test-settings-action-disabled-drift.yml index 9613aca36..cdf7843ea 100644 --- a/.github/workflows/test-settings-action-disabled-drift.yml +++ b/.github/workflows/test-settings-action-disabled-drift.yml @@ -46,7 +46,7 @@ jobs: with: component: "foobar-disabled" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} drift-detection-mode-enabled: true atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 diff --git a/.github/workflows/test-settings-action-disabled.yml b/.github/workflows/test-settings-action-disabled.yml index 80aae2bd7..79b36aa11 100644 --- a/.github/workflows/test-settings-action-disabled.yml +++ b/.github/workflows/test-settings-action-disabled.yml @@ -46,7 +46,7 @@ jobs: with: component: "foobar-disabled" stack: "plat-ue2-sandbox" - sha: da39a3ee5e6b4b0d3255bfef95601890afd80709 + sha: ${{ github.sha }} atmos-config-path: ${{ runner.temp }} atmos-version: 1.63.0 diff --git a/action.yml b/action.yml index 1894b9ae5..9ada2d528 100644 --- a/action.yml +++ b/action.yml @@ -61,6 +61,8 @@ runs: steps: - name: Checkout uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} - name: Set atmos cli config path vars shell: bash @@ -131,7 +133,7 @@ runs: uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: suzuki-shunsuke/tfcmt - tag: v4.6.0 + tag: v4.6.0 - name: Prepare Artifacts Directory if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' }} @@ -341,7 +343,7 @@ runs: sed -i "s/%INFRACOST_SUMMARY%/${INFRA_COST_SUMMARY}/" ${{ steps.vars.outputs.step_summary_file }} sed -i -e '/%INFRACOST_DIFF%/{r /tmp/infracost.txt' -e 'd}' ${{ steps.vars.outputs.step_summary_file }} - + - name: Store Component Metadata to Artifacts if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' && inputs.drift-detection-mode-enabled == 'true' }} @@ -393,4 +395,4 @@ runs: if: ${{ steps.atmos-github-actions-enabled.outputs.value == 'true' }} shell: bash run: | - exit ${{ steps.atmos-plan.outputs.result }} + exit ${{ steps.atmos-plan.outputs.result }}