Skip to content

Commit

Permalink
gha: Add update static files workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
philipnbbc committed Oct 8, 2024
1 parent e0b9048 commit d2a081e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/shared-ext-update-static-files-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
COMMONTOOLING_DEPLOY_KEY:
description: 'A deploy key that is used to fetch Commontooling'
required: true
AWS_ACCOUNT_ID:
description: 'An AWS Account ID, used to access ECR'
required: true

env:
COMMONTOOLING_BRANCH: ${{ inputs.commontoolingBranch == '' && 'main' || inputs.commontoolingBranch }}
Expand All @@ -22,6 +25,7 @@ jobs:
UpdateStaticFiles:
permissions:
contents: read
id-token: write
runs-on: ubuntu-22.04
environment:
name: update-static-files
Expand All @@ -32,6 +36,13 @@ jobs:
fetch-depth: 1
ssh-key: ${{ secrets.WRITE_ACCESS_DEPLOY_KEY }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/gha_ecr_public_read
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/update-static-files-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
name: Shared Workflow
permissions:
contents: read
id-token: write
# Github Actions doesn't allow the use of parameters in `uses` statements. If you want to use a different shared workflow branch, change it here
uses: ./.github/workflows/shared-ext-update-static-files-workflow.yml
with:
Expand Down

0 comments on commit d2a081e

Please sign in to comment.