-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.23 KB
/
backend-api-test-deploy.yml
File metadata and controls
54 lines (44 loc) · 1.23 KB
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
name: Backend API Test and Deploy
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'backend/api/**'
- 'go.work'
- '.github/workflows/backend-api-test-deploy.yml'
concurrency:
group: backend-api-test-deploy-${{ github.ref }}
cancel-in-progress: true
jobs:
test-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: backend/api/go.mod
cache: true
cache-dependency-path: |
backend/api/go.sum
infra/go.sum
- name: Run backend tests
working-directory: backend/api
run: go test ./...
- uses: actions/setup-node@v6
with:
node-version: 22
- name: Install AWS CDK CLI
run: npm install -g aws-cdk
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Deploy backend
run: ./infra/deploy.sh --build-image