FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
openada/.github/workflows/release.yml at main · techcto/openada · GitHub
techcto
openada
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
openada
/
.github
/
workflows
/
release.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
157 lines (142 loc) · 5.83 KB
Breadcrumbs
openada
/
.github
/
workflows
/
release.yml
Copy path
File metadata and controls
157 lines (142 loc) · 5.83 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
147
148
149
150
151
152
153
154
155
156
157
name
:
Release OpenADA to AWS Marketplace
on
:
push
:
tags
:
-
'
v*
'
workflow_dispatch
:
inputs
:
release_version
:
description
:
'
Release version to build and publish without the leading v
'
required
:
true
permissions
:
contents
:
read
env
:
AWS_REGION
:
${{ vars.AWS_REGION || 'us-east-1' }}
MP_AWS_ECR
:
${{ vars.MP_AWS_ECR || '709825985650.dkr.ecr.us-east-1.amazonaws.com' }}
UI_REPOSITORY
:
${{ vars.OPENADA_UI_REPOSITORY || 'solodev/openada-ui' }}
API_REPOSITORY
:
${{ vars.OPENADA_API_REPOSITORY || 'solodev/openada-api' }}
WORKER_REPOSITORY
:
${{ vars.OPENADA_WORKER_REPOSITORY || 'solodev/openada-worker' }}
LANGUAGETOOL_REPOSITORY
:
${{ vars.OPENADA_LANGUAGETOOL_REPOSITORY || 'solodev/openada-languagetool' }}
VERAPDF_REPOSITORY
:
${{ vars.OPENADA_VERAPDF_REPOSITORY || 'solodev/openada-verapdf' }}
OPENADA_CFT_BUCKET
:
${{ vars.OPENADA_CFT_BUCKET || 'openada-us' }}
jobs
:
release
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v4
with
:
submodules
:
recursive
-
name
:
Resolve release version
id
:
version
env
:
INPUT_VERSION
:
${{ github.event.inputs.release_version }}
run
:
|
version="$INPUT_VERSION"
if [ -z "$version" ]; then
version="${GITHUB_REF_NAME#v}"
fi
case "$version" in
''|*[!0-9A-Za-z.-]*)
echo "Invalid release version: $version" >&2
exit 1
;;
esac
echo "value=$version" >> "$GITHUB_OUTPUT"
-
name
:
Configure AWS credentials
uses
:
aws-actions/configure-aws-credentials@v4
with
:
aws-region
:
${{ env.AWS_REGION }}
aws-access-key-id
:
${{ vars.MP_AWS_ACCESS_KEY_ID }}
aws-secret-access-key
:
${{ secrets.MP_AWS_SECRET_ACCESS_KEY }}
-
name
:
Login to Marketplace ECR
run
:
|
aws ecr get-login-password --region "$AWS_REGION" | \
docker login --username AWS --password-stdin "$MP_AWS_ECR"
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v3
-
name
:
Build and publish UI image
uses
:
docker/build-push-action@v6
with
:
context
:
.
file
:
devops/docker/Dockerfile.app
target
:
prod
platforms
:
linux/amd64
push
:
true
provenance
:
false
sbom
:
false
tags
:
${{ env.MP_AWS_ECR }}/${{ env.UI_REPOSITORY }}:${{ steps.version.outputs.value }}
-
name
:
Build and publish API image
uses
:
docker/build-push-action@v6
with
:
context
:
.
file
:
devops/docker/Dockerfile.api
target
:
prod
platforms
:
linux/amd64
push
:
true
provenance
:
false
sbom
:
false
tags
:
${{ env.MP_AWS_ECR }}/${{ env.API_REPOSITORY }}:${{ steps.version.outputs.value }}
-
name
:
Build and publish worker image
uses
:
docker/build-push-action@v6
with
:
context
:
.
file
:
devops/docker/Dockerfile.worker
platforms
:
linux/amd64
push
:
true
provenance
:
false
sbom
:
false
tags
:
${{ env.MP_AWS_ECR }}/${{ env.WORKER_REPOSITORY }}:${{ steps.version.outputs.value }}
-
name
:
Build and publish LanguageTool sidecar image
uses
:
docker/build-push-action@v6
with
:
context
:
submodules/docker-languagetool
platforms
:
linux/amd64
push
:
true
provenance
:
false
sbom
:
false
tags
:
${{ env.MP_AWS_ECR }}/${{ env.LANGUAGETOOL_REPOSITORY }}:${{ steps.version.outputs.value }}
-
name
:
Build and publish veraPDF sidecar image
uses
:
docker/build-push-action@v6
with
:
context
:
.
file
:
devops/docker/Dockerfile.verapdf
platforms
:
linux/amd64
push
:
true
provenance
:
false
sbom
:
false
tags
:
${{ env.MP_AWS_ECR }}/${{ env.VERAPDF_REPOSITORY }}:${{ steps.version.outputs.value }}
-
name
:
Publish versioned CloudFormation templates
env
:
RELEASE_VERSION
:
${{ steps.version.outputs.value }}
run
:
|
for template in openada.yaml openada-existing.yaml; do
rendered="/tmp/$template"
sed \
-e "s|{MP_AWS_ECR}|$MP_AWS_ECR|g" \
-e "s|{UI_REPOSITORY}|$UI_REPOSITORY|g" \
-e "s|{API_REPOSITORY}|$API_REPOSITORY|g" \
-e "s|{WORKER_REPOSITORY}|$WORKER_REPOSITORY|g" \
-e "s|{LANGUAGETOOL_REPOSITORY}|$LANGUAGETOOL_REPOSITORY|g" \
-e "s|{VERAPDF_REPOSITORY}|$VERAPDF_REPOSITORY|g" \
-e "s|{RELEASE_VERSION}|$RELEASE_VERSION|g" \
"devops/cloudformation/$template" > "$rendered"
aws s3 cp "$rendered" \
"s3://$OPENADA_CFT_BUCKET/cloudformation/$template" \
--content-type text/yaml --cache-control no-cache --region "$AWS_REGION" --no-progress
versioned="${template%.yaml}-${RELEASE_VERSION}.yaml"
aws s3 cp "$rendered" \
"s3://$OPENADA_CFT_BUCKET/cloudformation/$versioned" \
--content-type text/yaml --cache-control no-cache --region "$AWS_REGION" --no-progress
done
aws s3 cp devops/cloudformation/README.md \
"s3://$OPENADA_CFT_BUCKET/cloudformation/README.md" \
--content-type text/markdown --cache-control no-cache --region "$AWS_REGION" --no-progress
aws s3 cp ada.sh \
"s3://$OPENADA_CFT_BUCKET/ada.sh" \
--content-type text/plain --cache-control no-cache --region "$AWS_REGION" --no-progress
-
name
:
Submit AWS Marketplace changeset
env
:
MP_AWS_MARKETPLACE_PRODUCT_ID
:
${{ vars.MP_AWS_MARKETPLACE_PRODUCT_ID }}
RELEASE_VERSION
:
${{ steps.version.outputs.value }}
run
:
bash devops/changeset.sh
Back
|
FazBrowse Home
|
New Git URL