From 42e31591e1df3daba7a6856d86844d2e41a70e61 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Thu, 29 Aug 2024 20:14:11 -0400 Subject: [PATCH] wip: testing --- blueprint.cue | 8 ++++++++ forge/actions/setup/action.yml | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/blueprint.cue b/blueprint.cue index d847aecb..57a0085c 100644 --- a/blueprint.cue +++ b/blueprint.cue @@ -1 +1,9 @@ version: "1.0" +ci: { + providers: { + aws: { + region: "eu-central-1" + role: "arn:aws:iam::332405224602:role/ci" + } + } +} diff --git a/forge/actions/setup/action.yml b/forge/actions/setup/action.yml index c4ff9247..cca2dc5d 100644 --- a/forge/actions/setup/action.yml +++ b/forge/actions/setup/action.yml @@ -10,6 +10,8 @@ inputs: runs: using: composite steps: + # If the local version of forge is requested, we try to build (and cache) it + # locally with Earthly - name: Install Earthly uses: earthly/actions-setup@v1 if: inputs.forge_version == 'local' @@ -29,6 +31,17 @@ runs: shell: bash run: | earthly --artifact ./forge/cli+build/forge /usr/local/bin/forge - - name: Check version + + - name: Get provider configuration shell: bash - run: forge version \ No newline at end of file + run: | + BP=$(forge blueprint dump .) + + AWS=$(echo "$BP" | jq -r .ci.providers.aws) + if [[ "$AWS" -ne "null" ]]; then + AWS_REGION=$(echo "$BP" | jq -r .ci.providers.aws.region) + AWS_ROLE=$(echo "$BP" | jq -r .ci.providers.aws.role) + fi + + echo "$AWS_REGION" + echo "$AWS_ROLE" \ No newline at end of file