name: CD on: push: branches: [ master ] jobs: build: name: Build and push docker images runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 with: submodules: recursive - name: Build neo4j image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/neo4j username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: latest path: Human-Connection/neo4j/ - name: Build backend base image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/backend username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: build-and-test target: build-and-test path: Human-Connection/backend/ - name: Build webapp base image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/webapp username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: build-and-test target: build-and-test path: Human-Connection/webapp/ - name: Build backend customized image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/backend username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: latest path: backend/ - name: Build webapp customized image uses: docker/build-push-action@v1.1.0 with: repository: schoolsinmotion/webapp username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} tags: latest path: webapp/