Update docker-image.yml

This commit is contained in:
Alberto Xamin 2020-11-21 22:48:41 +01:00 committed by GitHub
parent 6f3e7c8ae4
commit 02bbf866a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,15 +2,17 @@ name: Docker Images CI
on: on:
push: push:
branches: [ main ] branches: [ main ]
pull_request:
branches: [ main ]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build the Docker image - name: Build the Backend Docker image
run: cd backend;docker build . --file Dockerfile --tag bang-backend:$(date +%s) run: cd backend;docker build . --file Dockerfile --tag bang-backend:latest
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build the Docker image - name: Build the Frontend Docker image
run: cd frontend;docker build . --file Dockerfile --tag bang-frontend:$(date +%s) run: cd frontend;docker build . --file Dockerfile --tag bang-frontend:latest
- name: Log into registry
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Push iamges
run: docker push albertoxamin/bang-backend:latest; docker push albertoxamin/bang-frontend:latest