Skip to content

aws/auth: Pass outputs from upstream action to this action #49

aws/auth: Pass outputs from upstream action to this action

aws/auth: Pass outputs from upstream action to this action #49

Workflow file for this run

name: test-aws-auth
on:
merge_group: ~
workflow_dispatch: ~
pull_request:
paths:
- 'aws-auth/**'
- '.github/workflows/test-aws-auth.yml'
push:
branches:
- main
paths:
- 'aws-auth/**'
- '.github/workflows/test-aws-auth.yml'
permissions:
contents: read
id-token: write
jobs:
create-credentials:
outputs:
aws-access-key-id: ${{ steps.auth.outputs.aws-access-key-id }}
aws-secret-access-key: ${{ steps.auth.outputs.aws-secret-access-key }}
aws-session-token: ${{ steps.auth.outputs.aws-session-token }}
role-arn: ${{ steps.auth.outputs.role-arn }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./aws/auth
id: auth
with:
output-credentials: true
- run: aws sts get-caller-identity
test:
needs: create-credentials
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: ${{ needs.create-credentials.outputs.role-arn }}
aws-access-key-id: ${{ needs.create-credentials.outputs.aws-access-key-id }}
aws-secret-access-key: ${{ needs.create-credentials.outputs.aws-secret-access-key }}
aws-session-token: ${{ needs.create-credentials.outputs.aws-session-token }}
- run: aws sts get-caller-identity