From 0b638562ca4310e49349db631e562f1d778147f3 Mon Sep 17 00:00:00 2001 From: Joshua Gilman Date: Thu, 29 Aug 2024 20:46:43 -0400 Subject: [PATCH] wip: testing --- .github/workflows/external.yml | 10 ---------- .github/workflows/test.yml | 3 +++ forge/actions/setup/action.yml | 14 +++++++++++--- 3 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 .github/workflows/external.yml diff --git a/.github/workflows/external.yml b/.github/workflows/external.yml deleted file mode 100644 index e85e57d..0000000 --- a/.github/workflows/external.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Test -on: - workflow_call: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Hello - run: echo "Hello, world!" \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 843db1c..45bddf1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,9 @@ name: Test on: push: +permissions: + id-token: write + jobs: test: runs-on: ubuntu-latest diff --git a/forge/actions/setup/action.yml b/forge/actions/setup/action.yml index 226f030..95a17cc 100644 --- a/forge/actions/setup/action.yml +++ b/forge/actions/setup/action.yml @@ -20,7 +20,7 @@ runs: - name: Cache Forge CLI binary if: inputs.forge_version == 'local' id: cache-forge - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /usr/local/bin/forge key: ${{ runner.os }}-forge-${{ hashFiles('forge/cli/**') }} @@ -33,6 +33,7 @@ runs: earthly --artifact ./forge/cli+build/forge /usr/local/bin/forge - name: Get provider configuration + id: provider shell: bash run: | BP=$(forge blueprint dump .) @@ -43,5 +44,12 @@ runs: AWS_ROLE=$(echo "$BP" | jq -r .ci.providers.aws.role) fi - echo "$AWS_REGION" - echo "$AWS_ROLE" \ No newline at end of file + echo "aws_region=$AWS_REGION" >> $GITHUB_OUTPUT + echo "aws_role=$AWS_ROLE" >> $GITHUB_OUTPUT + + - name: Configure AWS + uses: aws-actions/configure-aws-credentials@v4 + if: ${{ steps.provider.outputs.aws_region != '' && steps.provider.outputs.aws_role != '' }} + with: + aws-region: ${{ steps.provider.outputs.aws_region }} + role-to-assume: ${{ steps.provider.outputs.aws_role }} \ No newline at end of file