-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (53 loc) · 1.73 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Find full documentation here https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: CI
on:
pull_request:
# Manual invocation.
workflow_dispatch:
push:
branches:
- main
# Ensure we only ever have one build running at a time.
# If we push twice in quick succession, the first build will be stopped once the second starts.
# This avoids any race conditions.
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
CI:
runs-on: ubuntu-latest
permissions:
contents: read
# These permissions are required by guardian/actions-riff-raff...
id-token: write # ...to exchange an OIDC JWT ID token for AWS credentials
pull-requests: write #...to comment on PRs
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: test
run: npm test
- name: Build
run: npm run build
- name: Synth CDK
run: npm -w cdk run synth
# See https://github.com/guardian/actions-riff-raff
- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v4
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
projectName: playground::example-typescript-lambda
configPath: packages/cdk/cdk.out/riff-raff.yaml
contentDirectories: |
cdk.out:
- packages/cdk/cdk.out
example-typescript-lambda:
- packages/lambda/dist/example-typescript-lambda.zip