Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gha: Add update static files workflow #22

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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