Skip to content

Merge pull request #161 from com-pas/renovate/postgres-14.x #22

Merge pull request #161 from com-pas/renovate/postgres-14.x

Merge pull request #161 from com-pas/renovate/postgres-14.x #22

# 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 }}