Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Add more CI steps
Browse files Browse the repository at this point in the history
  • Loading branch information
twaslowski committed Jan 20, 2024
1 parent 8adcd28 commit 0cd658c
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Docker Image CI

permissions:
contents: read
id-token: write
Expand All @@ -11,18 +11,44 @@ on:
branches: [ "main" ]

jobs:
build:
build-docker:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
uses: actions/checkout@v3
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
uses: actions/checkout@v3
run: cd backend && ./docker-util.sh build translation

push-docker:
runs-on: ubuntu-latest
steps:
- 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
- uses: actions/checkout@v3
- name: Build the Docker image
run: |
pushd backend
./docker-util.sh build translation
./docker-util.sh push translation
cd terraform && terraform apply -auto-approve
uses: actions/checkout@v3
run: cd backend && ./docker-util.sh build translation

create-infrastructure:
runs-on: ubuntu-latest
steps:
- 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

0 comments on commit 0cd658c

Please sign in to comment.