-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (43 loc) · 1.58 KB
/
cim-mapping-aws.yml
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
# SPDX-FileCopyrightText: 2023 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0
name: Deploy CoMPAS Cim Mapping on AWS
on:
push:
branches:
- main
jobs:
deployment:
runs-on: ubuntu-latest
environment: aws
steps:
- name: checkout
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: read-docker-compose
id: read_docker_compose
uses: jbutcher5/read-yaml@main
with:
file: './compas/docker-compose-postgresql.yml'
key-path: '["services", "cim-mapping", "image"]'
- name: Render CoMPAS OpenSCD Container
id: render-cim-mapping
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
task-definition: ${{ github.workspace }}/aws/task-definitions/compas-cim-mapping.json
container-name: CoMPAS-Cim-Mapping
image: ${{ steps.read_docker_compose.outputs.data }}
environment-variables: |
JWT_VERIFY_KEY=${{ secrets.JWT_VERIFY_KEY }}
JWT_VERIFY_ISSUER=${{ secrets.JWT_VERIFY_ISSUER }}
- name: Deploy to Amazon ECS service
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.render-cim-mapping.outputs.task-definition }}
service: Compas-Cim-Mapping
cluster: ${{ secrets.AWS_CLUSTER }}