Skip to content

Commit ffbd925

Browse files
Merge pull request #813 from Mark-Simulacrum/ci
Adjust sync-team kickoff to use ephemeral credentials
2 parents a8faa33 + 57beabf commit ffbd925

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ jobs:
55
name: CI
66
runs-on: ubuntu-latest
77
if: github.repository == 'rust-lang/team'
8+
permissions:
9+
id-token: write
810
steps:
911

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

51+
- name: Configure AWS credentials
52+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
53+
uses: aws-actions/configure-aws-credentials@v1
54+
with:
55+
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--team
56+
aws-region: us-west-1
57+
4958
- name: Start the synchronization tool
59+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
5060
run: |
61+
# Introduce some artifical delay to help github pages propagate.
62+
sleep 60
5163
aws --region us-west-1 lambda invoke --function-name start-sync-team output.json
5264
cat output.json | python3 -m json.tool
53-
env:
54-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
55-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
56-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'

0 commit comments

Comments
 (0)