Skip to content

Commit

Permalink
Fix checkout sha (#78)
Browse files Browse the repository at this point in the history
* Fix checkout sha

* Update foobar.yaml

* Update integration-tests.yml

* Update test-changes-exists-drift.yml

* Update action.yml

* Test get settings

* Test get settings

* Test get settings

* Test get settings

* Update action.yml

* Update integration-tests.yml

* Update integration-tests.yml

* Update integration-tests.yml

* Test get settings

* Test get settings

* Update action.yml

* Test get settings

* Update integration-tests.yml

* Update test-changes-exists-drift.yml

* Update action.yml

* Test get settings

* Test get settings
  • Loading branch information
goruha authored Jun 8, 2024
1 parent 2313b46 commit 54abf42
Show file tree
Hide file tree
Showing 16 changed files with 47 additions and 69 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ jobs:
with:
component: "foobar"
stack: "plat-ue2-sandbox"
atmos-config-path: ${{ runner.temp }}
atmos-config-path: ${{ runner.temp }}
atmos-version: v1.72.0
20 changes: 0 additions & 20 deletions .github/workflows/release-branch.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/release-published.yml

This file was deleted.

8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
---
name: release
name: Release
on:
release:
types:
- published
types: [published]

permissions:
id-token: write
contents: write
pull-requests: write

jobs:
terraform-module:
github-action:
uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main
secrets: inherit
16 changes: 0 additions & 16 deletions .github/workflows/scheduled.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test-changes-exists-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
"component": "foobar/changes",
"stack": "plat-ue2-sandbox",
"componentPath": "tests/components/terraform/foobar",
"commitSHA": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
"commitSHA": "${{ github.sha }}"
}
```
</details>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-changes-exists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-failed-plan-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
"component": "foobar-fail",
"stack": "plat-ue2-sandbox",
"componentPath": "tests/components/terraform/foobar",
"commitSHA": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
"commitSHA": "${{ github.sha }}"
}
```
</details>
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-failed-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-infra-cost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-no-changes-drift-more.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-no-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-settings-action-disabled-drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-settings-action-disabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 5 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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' }}
Expand Down Expand Up @@ -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' }}
Expand Down Expand Up @@ -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 }}

0 comments on commit 54abf42

Please sign in to comment.