mirror of
https://github.com/usatiuk/photos.git
synced 2025-10-28 23:37:48 +01:00
use circleci for docker builds
This commit is contained in:
@@ -108,15 +108,44 @@ jobs:
|
||||
key: frontend-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- run:
|
||||
name: test frontend
|
||||
name: build frontend
|
||||
command: cd frontend && npm run build
|
||||
|
||||
build:
|
||||
machine:
|
||||
image: ubuntu-2004:202107-01
|
||||
working_directory: ~/photos
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: log in to docker hub
|
||||
command: echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USERNAME --password-stdin
|
||||
|
||||
- run:
|
||||
name: install emulators
|
||||
command: docker run --privileged --rm tonistiigi/binfmt --install all
|
||||
|
||||
- run:
|
||||
name: create docker builder
|
||||
command: docker buildx create --use
|
||||
|
||||
- run:
|
||||
name: build and push to docker hub
|
||||
#command: docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag stepanusatiuk/photos:latest .
|
||||
command: docker buildx build --push --platform linux/amd64 --tag stepanusatiuk/photos:latest .
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
test-build:
|
||||
jobs:
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- test-frontend-build:
|
||||
requires:
|
||||
- test-frontend
|
||||
- build:
|
||||
requires:
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- test-frontend-build
|
||||
|
||||
Reference in New Issue
Block a user