Skip to content

Commit

Permalink
Merge pull request #813 from Mark-Simulacrum/ci
Browse files Browse the repository at this point in the history
Adjust sync-team kickoff to use ephemeral credentials
  • Loading branch information
Mark-Simulacrum authored Sep 21, 2022
2 parents a8faa33 + 57beabf commit ffbd925
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ jobs:
name: CI
runs-on: ubuntu-latest
if: github.repository == 'rust-lang/team'
permissions:
id-token: write
steps:

- uses: actions/checkout@main
Expand Down Expand Up @@ -46,11 +48,17 @@ jobs:
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }}
if: github.event_name == 'push' && github.ref == 'refs/heads/master'

- name: Configure AWS credentials
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--team
aws-region: us-west-1

- name: Start the synchronization tool
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
# Introduce some artifical delay to help github pages propagate.
sleep 60
aws --region us-west-1 lambda invoke --function-name start-sync-team output.json
cat output.json | python3 -m json.tool
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' && github.ref == 'refs/heads/master'

0 comments on commit ffbd925

Please sign in to comment.