Skip to content

Commit

Permalink
Move configs to atmos.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha committed Feb 15, 2024
1 parent 7f6abe4 commit 67be822
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 67be822

Please sign in to comment.