generated from cloudposse-github-actions/typescript-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## what * Move `atmos-gitops-config.yaml` to `atmos.yaml`
- Loading branch information
Showing
10 changed files
with
337 additions
and
213 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
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
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
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
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 |
---|---|---|
|
@@ -13,10 +13,13 @@ inputs: | |
description: The head ref to checkout. If not provided, the head default branch is used. | ||
required: false | ||
default: ${{ github.sha }} | ||
atmos-gitops-config-path: | ||
description: The path to the atmos-gitops.yaml file | ||
atmos-version: | ||
description: The version of atmos to install | ||
required: false | ||
default: ./.github/config/atmos-gitops.yaml | ||
default: ">= 1.63.0" | ||
atmos-config-path: | ||
description: The path to the atmos.yaml file | ||
required: true | ||
jq-version: | ||
description: The version of jq to install if install-jq is true | ||
required: false | ||
|
@@ -47,40 +50,35 @@ runs: | |
with: | ||
ref: ${{ inputs.head-ref }} | ||
|
||
- name: Read Atmos GitOps config | ||
## We have to reference cloudposse fork of https://github.com/blablacar/action-config-levels | ||
## before https://github.com/blablacar/action-config-levels/pull/16 would be merged | ||
uses: cloudposse/github-action-config-levels@nodejs20 | ||
id: config | ||
with: | ||
output_properties: true | ||
patterns: | | ||
- ${{ inputs.atmos-gitops-config-path }} | ||
- name: Install Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
- name: Install JQ | ||
uses: dcarbone/[email protected] | ||
with: | ||
terraform_version: ${{ steps.config.outputs.terraform-version }} | ||
terraform_wrapper: false | ||
version: ${{ inputs.jq-version }} | ||
|
||
- name: Install Atmos | ||
uses: cloudposse/github-action-setup-atmos@v2 | ||
env: | ||
ATMOS_CLI_CONFIG_PATH: ${{inputs.atmos-config-path}} | ||
with: | ||
atmos-version: ${{ steps.config.outputs.atmos-version }} | ||
atmos-version: ${{ inputs.atmos-version }} | ||
install-wrapper: false | ||
|
||
- name: Install JQ | ||
uses: dcarbone/[email protected] | ||
with: | ||
version: ${{ inputs.jq-version }} | ||
- name: Set vars | ||
shell: bash | ||
run: |- | ||
echo "ATMOS_CLI_CONFIG_PATH=$(realpath ${{ inputs.atmos-config-path }})" >> $GITHUB_ENV | ||
- name: config | ||
shell: bash | ||
id: config | ||
run: |- | ||
echo "group-by=$(atmos describe config -f json | jq -r '.integrations.github.gitops.matrix["group-by"]')" >> $GITHUB_OUTPUT | ||
echo "sort-by=$(atmos describe config -f json | jq -r '.integrations.github.gitops.matrix["sort-by"]')" >> $GITHUB_OUTPUT | ||
- name: Filter Components | ||
id: selected-components | ||
shell: bash | ||
env: | ||
ATMOS_CLI_CONFIG_PATH: ${{ steps.config.outputs.atmos-config-path }} | ||
JQUERY: | | ||
with_entries(.value |= (.components.terraform)) | ## Deal with components type of terraform | ||
map_values(map_values(select(${{ inputs.select-filter }}))) | ## Filter components by enabled github actions | ||
|
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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