This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
More CI fixes #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | ||
permissions: | ||
contents: read | ||
id-token: write | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build-and-push-docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt update | ||
sudo apt install pipx | ||
pipx ensurepath | ||
pipx install poetry | ||
- name: Poetry setup | ||
run: | | ||
cd backend && poetry install | ||
- name: Build the Docker image | ||
run: cd backend && ./docker-util.sh build translation | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::246770851643:role/github-actions | ||
aws-region: eu-central-1 | ||
- name: Build the Docker image | ||
run: cd backend && ./docker-util.sh build translation | ||
create-infrastructure: | ||
depends-on: [build-and-push-docker] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::246770851643:role/github-actions | ||
aws-region: eu-central-1 | ||
- name: Create Terraform Infrastructure | ||
run: cd terraform && terraform apply -auto-approve |