Skip to content

try to fix deploy wf #18

try to fix deploy wf

try to fix deploy wf #18

Workflow file for this run

name: Build & publish docker images
on:
workflow_dispatch:
push:
tags:
- '**'
jobs:
frontend:
name: Build & push frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Add COMMIT_SHORT_SHA env property
run: echo "COMMIT_SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & push frontend image to docker hub
uses: docker/build-push-action@v3
with:
context: "{{defaultContext}}:frontend"
build-args: |
LASIUS_VERSION=${{github.ref_name}}
push: true
tags: tegonal/lasius-frontend:${{github.ref_name}}
backend:
name: Build & push backend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 17
- name: Build backend
working-directory: ./backend
run: sbt clean update compile test dist
- name: Add COMMIT_SHORT_SHA env property
run: echo "COMMIT_SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build & push backend image to docker hub
uses: docker/build-push-action@v3
with:
context: ./backend
push: true
tags: tegonal/lasius-backend:${{github.ref_name}}