From 2e9b0474fba47617073d4d8a1c76a5c05a224914 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 20 Oct 2021 16:51:32 +0200 Subject: [PATCH] Try some automation --- .github/workflows/build-docker-images.yml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build-docker-images.yml diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml new file mode 100644 index 0000000..9a0f8bd --- /dev/null +++ b/.github/workflows/build-docker-images.yml @@ -0,0 +1,30 @@ +name: Build docker images + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build-backend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: echo ${{ GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin + - run: docker build ./backend --tag ghcr.io/steffo99/sophon-backend:latest + - run: docker push ghcr.io/steffo99/sophon-backend:latest + build-frontend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: echo ${{ GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin + - run: docker build ./frontend --tag ghcr.io/steffo99/sophon-frontend:latest + - run: docker push ghcr.io/steffo99/sophon-frontend:latest + build-proxy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: echo ${{ GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin + - run: docker build ./proxy --tag ghcr.io/steffo99/sophon-proxy:latest + - run: docker push ghcr.io/steffo99/sophon-proxy:latest