-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (78 loc) · 2.12 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
79
80
81
82
83
84
name: ci
env:
BINARY_NAME: devx-logs-linux
on:
pull_request:
workflow_dispatch:
push:
branches:
- main
jobs:
cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: lint, test, compile
working-directory: cli
run: |
deno fmt --check
deno test
deno task compile
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.17"
- name: Run tests
working-directory: ec2
run: go test .
upload:
runs-on: ubuntu-latest
needs: [test]
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
# required by guardian/actions-riff-raff@v4
id-token: write
contents: read
pull-requests: write # required since guardian/actions-riff-raff@v3
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.17"
- name: Build
working-directory: ec2
run: |
GOOS=linux GOARCH=arm64 go build -o $BINARY_NAME-arm64 main.go
GOOS=linux GOARCH=amd64 go build -o $BINARY_NAME-amd64 main.go
- uses: guardian/actions-riff-raff@v4
with:
app: devx-logs
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
contentDirectories: |
devx-logs:
- ec2/${{ env.BINARY_NAME }}-arm64
- ec2/${{ env.BINARY_NAME }}-amd64
config: |
stacks:
- deploy
regions:
- eu-west-1
allowedStages:
- CODE
- PROD
deployments:
devx-logs:
type: aws-s3
parameters:
bucket: amigo-data
cacheControl: private
publicReadAcl: false