-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (70 loc) · 2.06 KB
/
ci.yaml
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
69
70
71
72
73
74
75
76
77
78
name: CI
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: eu-west-1
role-to-assume: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
- uses: guardian/[email protected]
with:
private-ssh-keys: ${{ secrets.PRIVATE_INFRASTRUCTURE_CONFIG_DEPLOY_KEY }}
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: npm
- uses: actions/setup-go@v3
with:
go-version: '1.18'
- name: Build Go service
run: |
cd service
GOOS=linux GOARCH=arm64 go build -o static-site-service main.go
- name: CDK Synth
run: |
npm ci
npm test -- --passWithNoTests
npm run synth-infra
- uses: guardian/actions-riff-raff@v2
with:
app: actions-static-site-infra
config: |
stacks:
- deploy
regions:
- eu-west-1
allowedStages:
- INFRA
deployments:
cfn:
app: actions-static-site-infra
type: cloud-formation
parameters:
templatePath: Static-Site-INFRA.template.json
amiParameter: AMIActionsstaticsiteinfra
amiTags:
BuiltBy: amigo
Recipe: arm64-focal-java11-deploy-infrastructure
AmigoStage: PROD
app:
app: actions-static-site-infra
type: autoscaling
parameters:
bucketSsmLookup: true
prefixApp: true
dependencies:
- cfn
contentDirectories: |
cfn: [cdk.out/Static-Site-INFRA.template.json]
app: [service/static-site-service]