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.
- Loading branch information
Showing
1 changed file
with
22 additions
and
25 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 |
---|---|---|
|
@@ -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,34 +50,28 @@ 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@v2 | ||
- 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 | ||
- if: ${{ inputs.install-atmos == 'true' }} | ||
uses: cloudposse/github-action-setup-atmos@v1 | ||
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 | ||
|