V3 — Update to node current LTS (20.12.2) and core dependencies #175
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: CI | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write # required since guardian/actions-riff-raff@v3 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: guardian/actions-read-private-repos@v1 | |
with: | |
private-ssh-keys: ${{ secrets.PRIVATE_INFRASTRUCTURE_CONFIG_DEPLOY_KEY }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- uses: actions/setup-go@v5 | |
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@v4 | |
with: | |
app: actions-static-site-infra | |
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }} | |
githubToken: ${{ secrets.GITHUB_TOKEN }} | |
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] |