2022-10-10 17:59:02 +02:00
|
|
|
name: Create Docker Image for Backend
|
2022-05-11 14:28:10 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: main
|
2022-10-10 22:32:54 +02:00
|
|
|
paths:
|
2022-10-10 22:36:56 +02:00
|
|
|
- "backend/**"
|
2022-05-11 14:28:10 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout code
|
|
|
|
uses: actions/checkout@v2
|
2022-10-10 17:59:02 +02:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2022-05-11 14:28:10 +02:00
|
|
|
- name: login to docker registry
|
2022-05-11 19:32:15 +02:00
|
|
|
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
2022-05-11 14:28:10 +02:00
|
|
|
- name: build the image
|
|
|
|
run: |
|
2022-10-10 22:36:56 +02:00
|
|
|
cd backend && docker buildx build --push \
|
|
|
|
--tag stonith404/pingvin-share-backend:latest \
|
|
|
|
--platform linux/amd64,linux/arm64 .
|