add cache-dependency-path #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: support-reminders 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 clean | |
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: ./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 |