-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,21 +130,21 @@ runs: | |
outputPath: command | ||
- name: Set atmos cli base path vars | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled }} | ||
shell: bash | ||
run: |- | ||
# Set ATMOS_BASE_PATH allow `cloudposse/utils` provider to read atmos config from the correct path | ||
ATMOS_BASE_PATH="${{ fromJson(steps.component.outputs.settings).base-path }}" | ||
echo "ATMOS_BASE_PATH=$(realpath ${ATMOS_BASE_PATH:-./})" >> $GITHUB_ENV | ||
- name: Prepare Artifacts Directory | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled }} | ||
shell: bash | ||
run: | | ||
mkdir -p metadata | ||
- name: Define Job Variables | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled }} | ||
id: vars | ||
shell: bash | ||
run: | | ||
|
@@ -173,7 +173,7 @@ runs: | |
echo "issue_file=${ISSUE_SUMMARY_FILE}" >> $GITHUB_OUTPUT | ||
- name: Configure Plan AWS Credentials | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled }} | ||
uses: aws-actions/[email protected] | ||
with: | ||
aws-region: ${{ steps.config.outputs.aws-region }} | ||
|
@@ -184,14 +184,14 @@ runs: | |
- name: Cache .terraform | ||
id: cache | ||
uses: actions/cache@v4 | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled }} | ||
with: | ||
path: | | ||
./${{ steps.vars.outputs.component_path }}/.terraform | ||
key: ${{ steps.vars.outputs.cache-key }} | ||
|
||
- name: Atmos Terraform Plan | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled }} | ||
id: atmos-plan | ||
shell: bash | ||
run: | | ||
|
@@ -358,7 +358,7 @@ runs: | |
sed -i -e '/%INFRACOST_DIFF%/{r /tmp/infracost.txt' -e 'd}' ${{ steps.vars.outputs.step_summary_file }} | ||
- name: Store Component Metadata to Artifacts | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' && inputs.drift-detection-mode-enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled && inputs.drift-detection-mode-enabled == 'true' }} | ||
shell: bash | ||
run: | | ||
echo -n '{ "stack": "${{ inputs.stack }}", "component": "${{ inputs.component }}", "componentPath": "${{ steps.vars.outputs.component_path }}", "drifted": '"${{ steps.atmos-plan.outputs.changes }}"', "error": '"${{ steps.atmos-plan.outputs.error }}"' }' > "metadata/${{ steps.vars.outputs.component_slug }}.metadata.json" | ||
|
@@ -402,7 +402,7 @@ runs: | |
echo "rand=$(openssl rand -hex 5)" >> "$GITHUB_OUTPUT" | ||
- name: Upload Artifacts | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' && inputs.drift-detection-mode-enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled && inputs.drift-detection-mode-enabled == 'true' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
# The name of the artifact needs to be unique for every job run! | ||
|
@@ -412,7 +412,7 @@ runs: | |
retention-days: ${{ inputs.metadata-retention-days }} | ||
|
||
- name: Exit status | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled == 'true' }} | ||
if: ${{ fromJson(steps.component.outputs.settings).enabled }} | ||
shell: bash | ||
run: | | ||
exit ${{ steps.atmos-plan.outputs.result }} |