Skip to content

Commit

Permalink
assume role gh (#23)
Browse files Browse the repository at this point in the history
* assume role gh

* fix

* refactor order

* refactor

* use vars

* refactor
  • Loading branch information
norbybaru committed Aug 7, 2023
1 parent cd676b9 commit e084710
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
jobs:
build:
runs-on: ubuntu-latest
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read

strategy:
fail-fast: false
Expand All @@ -31,6 +35,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ vars.AWS_ASSUME_ROLE }}
aws-region: eu-west-1

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -55,8 +65,4 @@ jobs:
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Run PHPUnit tests
run: vendor/bin/phpunit --testdox
env:
AWS_TIMESTREAM_KEY: ${{ secrets.AWS_TIMESTREAM_KEY }}
AWS_TIMESTREAM_SECRET: ${{ secrets.AWS_TIMESTREAM_SECRET }}
AWS_TIMESTREAM_DATABASE: laravel-aws-timestream
run: composer test

0 comments on commit e084710

Please sign in to comment.