diff --git a/.github/actions/configure-rebar/action.yml b/.github/actions/configure-rebar/action.yml index 8576af9..c7fb498 100644 --- a/.github/actions/configure-rebar/action.yml +++ b/.github/actions/configure-rebar/action.yml @@ -1,5 +1,9 @@ name: Configure Rebar3 description: 'Configure publishing token for Rebar3' +inputs: + aws_assume_role: + description: 'The ARN of an AWS IAM role to assume. Used to auth with AWS to upload results to S3.' + required: true runs: using: composite @@ -7,7 +11,7 @@ runs: - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.0.0 name: 'Get the hex publishing token' with: - aws_assume_role: ${{ vars.AWS_ROLE_ARN }} + aws_assume_role: ${{ inputs.aws_assume_role }} ssm_parameter_pairs: '/production/common/releasing/hex/api_key = HEX_AUTH_TOKEN' - name: Configure rebar3 shell: bash diff --git a/.github/workflows/manual-publish-docs.yml b/.github/workflows/manual-publish-docs.yml index a6e79e9..47e2c2b 100644 --- a/.github/workflows/manual-publish-docs.yml +++ b/.github/workflows/manual-publish-docs.yml @@ -17,6 +17,8 @@ jobs: uses: ./.github/actions/build-docs - uses: ./.github/actions/configure-rebar + with: + aws_assume_role: ${{ vars.AWS_ROLE_ARN }} - id: publish name: Publish Documentation diff --git a/.github/workflows/manual-publish.yml b/.github/workflows/manual-publish.yml index e9be446..fd5befb 100644 --- a/.github/workflows/manual-publish.yml +++ b/.github/workflows/manual-publish.yml @@ -27,6 +27,8 @@ jobs: # uses: ./.github/actions/ci - uses: ./.github/actions/configure-rebar + with: + aws_assume_role: ${{ vars.AWS_ROLE_ARN }} if: ${{ !inputs.dry_run }} - id: publish diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 50c2871..69506b7 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -35,6 +35,8 @@ jobs: fetch-depth: 0 #If you only need the current version keep this. - uses: ./.github/actions/configure-rebar + with: + aws_assume_role: ${{ vars.AWS_ROLE_ARN }} if: ${{ steps.release.outputs.releases_created }} - uses: ./.github/actions/ci