-
Notifications
You must be signed in to change notification settings - Fork 0
146 lines (144 loc) · 4.79 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: 'CI'
on:
workflow_dispatch:
push:
jobs:
media-download-ci:
permissions:
id-token: write
contents: read
pull-requests: write
runs-on: 2core-ubuntu-latest-arm
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build media-download
run: npm run media-download::build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: aws-actions/configure-aws-credentials@v4
name: Configure AWS credentials for pushing to ECR
with:
role-to-assume: ${{ secrets.INVESTIGATIONS_GITHUB_ACTIONS_ROLE_ARN }}
aws-region: eu-west-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build and push media-download Docker image
uses: docker/build-push-action@v5
with:
context: .
file: containers/media-download.Dockerfile
platforms: linux/arm64
push: true
tags: ${{ secrets.MEDIA_DOWNLOAD_ECR_URI }}:${{ github.ref_name }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
node_version=20.11.0
ci:
permissions:
id-token: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'npm'
- name: Install dependencies
run: |
npm install
- name: build API
run: |
npm run api::build
- name: build Client
run: |
npm run client::build
- name: Build output-handler
run: |
npm run output-handler::build
- name: Build media-export
run: |
npm run media-export::build
- name: Build worker-capacity-manager
run: |
npm run worker-capacity-manager::build
- name: Build media-download
run: |
npm run media-download::build
- name: Package API/Client/Update
run: |
npm run package
- name: Package Worker
run: |
npm run worker::build
npm run worker::package
- name: CDK synth
run: |
export CONTAINER_VERSION=${{ github.ref_name }}
npm run cdk::build
npm run cdk::lint
npm run cdk::synth
- name: Upload to riff-raff
uses: guardian/actions-riff-raff@v4
with:
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
configPath: packages/cdk/riff-raff.yaml
buildNumberOffset: 120
projectName: investigations::transcription-service
contentDirectories: |
cdk.out:
- packages/cdk/cdk.out/TranscriptionService-CODE.template.json
- packages/cdk/cdk.out/TranscriptionService-PROD.template.json
transcription-service-api:
- target/api.zip
transcription-service-output-handler:
- target/output-handler.zip
transcription-service-media-export:
- target/media-export.zip
transcription-service-worker-capacity-manager:
- target/worker-capacity-manager.zip
transcription-service-worker:
- packages/worker/dist/transcription-service-worker_1.0.0_all.deb
- name: Upload repository project to riff-raff
uses: guardian/actions-riff-raff@v4
with:
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
configPath: packages/cdk/riff-raff-repository.yaml
projectName: investigations::transcription-service-repository
contentDirectories: |
cdk.out:
- packages/cdk/cdk.out/TranscriptionServiceRepository.template.json
whisperx-model-fetch:
permissions:
id-token: write
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Upload whisperx model fetch project to riff-raff
uses: guardian/actions-riff-raff@v4
with:
roleArn: ${{ secrets.GU_RIFF_RAFF_ROLE_ARN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
configPath: whisperx-model-fetch/riff-raff.yaml
projectName: investigations::transcription-service-whisperx-model-fetch
contentDirectories: |
whisperx-model-fetch:
- whisperx-model-fetch/download_whisperx_models.py