Merge pull request #5 from jovotech/github-actions #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Latest | |
on: | |
push: | |
# start workflow on releases named YYYY-MM-DD-(patch|minor) | |
# e.g. 2022-04-21-patch, 2022-04-21-2-patch, 2022-04-21-minor | |
# tags: | |
# - "20*" | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Check Out Repo | |
uses: actions/checkout@v2 | |
with: | |
ref: v4/docker | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: "Build and push frontend" | |
id: docker_build_frontend_latest | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: ./frontend/Dockerfile | |
push: true | |
target: production | |
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/jovo-inbox-frontend:latest | |
- name: "Build and push backend" | |
id: docker_build_backend_latest | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: ./backend/Dockerfile | |
push: true | |
target: production | |
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/jovo-inbox-backend:latest |