Skip to content

.github/workflows/oidc-sync.yml #22

.github/workflows/oidc-sync.yml

.github/workflows/oidc-sync.yml #22

Workflow file for this run

#
# Copying instructions
#
# the STACK must be the cloud formation stack that created the S3 bucket and distribution
#
# The role-to-assume must be the role created for the STACK which is the `${REPO_NAME}-repo`
#
on:
workflow_dispatch:
env:
STACK: WwwDevStack #make sure this is the right stack value
AWS_ACCOUNT: "510094580976"
REPO: "hello.dev"
ROLE: "arn:aws:iam::${AWS_ACCOUNT}:${REPO}-repo"
jobs:
deploy:
name: Upload to Amazon S3
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install modules and cache
uses: actions/setup-node@v3
with:
node-version: '18' # Choose the Node.js version you're using
cache: 'npm' # Specify the cache key
- name: Restore npm cache
run: npm ci
- name: Configure web-sync AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ ROLE }}

Check failure on line 42 in .github/workflows/oidc-sync.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/oidc-sync.yml

Invalid workflow file

The workflow is not valid. .github/workflows/oidc-sync.yml (Line: 42, Col: 27): Unrecognized named-value: 'ROLE'. Located at position 1 within expression: ROLE
aws-region: us-west-2
- name: debug
run: echo $ROLE
# - name: Build content
# run: npm run build
# - name: Copy docs dir to S3 bucket with the AWS CLI
# run: |
# BUCKET_NAME=$(aws cloudformation describe-stacks --stack-name $STACK --query 'Stacks[0].Outputs[?OutputKey==`BucketNameOutput`].OutputValue' --output text)
# aws s3 sync docs/ s3://${BUCKET_NAME}/
# - name: Invalidate CloudFront cache
# run: |
# DISTRIBUTION_ID=$(aws cloudformation describe-stacks --stack-name $STACK --query 'Stacks[0].Outputs[?OutputKey==`DistributionIdOutput`].OutputValue' --output text)
# aws cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths "/*"