Skip to content

update path to riff-raff.yaml #7

update path to riff-raff.yaml

update path to riff-raff.yaml #7

name: Build typescript-lambda-hello-world
on:
- push
jobs:
CI:
if: github.repository_owner == 'guardian'
# Required by actions-assume-aws-role
permissions:
id-token: write
contents: read
name: typescript-lambda-hello-world build
runs-on: ubuntu-latest
steps:
- name: Env
run: env
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: 'handlers/TypescriptHelloWorld1/.nvmrc'
cache: 'yarn'
cache-dependency-path: handlers/TypescriptHelloWorld1/yarn.lock
- name: Yarn
run: |
yarn install
yarn run build
working-directory: handlers/TypescriptHelloWorld1
- name: Copy files to Riff Raff package
run: cp package.json riff-raff.yaml dist
working-directory: handlers/TypescriptHelloWorld1
- name: Zip target directory contents (quietly)
run: zip -qr ../typescript-lambda-hello-world.zip ./*
working-directory: handlers/TypescriptHelloWorld1/dist
- name: Yarn (CDK)
working-directory: cdk
run: |
yarn install
yarn tsc
yarn lint
yarn test
- name: Yarn synth (CDK)
working-directory: cdk
run: yarn synth
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
- name: Upload to Riff-Raff
uses: guardian/actions-riff-raff@v2
with:
app: typescript-lambda-hello-world
configPath: handlers/TypescriptHelloWorld1/riff-raff.yaml
contentDirectories: |
typescript-lambda-hello-world-cloudformation:
- ./cdk/cdk.out/typescript-lambda-hello-world-DEV.template.json
typescript-lambda-hello-world:
- handlers/TypescriptHelloWorld1/typescript-lambda-hello-world.zip