Skip to content

useEffect

useEffect #61

Workflow file for this run

name: Build and deploy
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
lint-frontend:
uses: ./.github/workflows/_lint.yaml
with:
working-directory: frontend
lint-checkpoint:
needs: [lint-frontend]
runs-on: ubuntu-latest
steps:
- name: Checkpoint
run: echo "Linting completed"
build-frontend:
needs: [lint-checkpoint]
runs-on: ubuntu-latest
env:
PUBLIC_BACKEND_URL: ${{ vars.PUBLIC_BACKEND_URL }}
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./frontend
push: ${{ github.event_name != 'pull_request' }}
pull: true
build-args: |
PUBLIC_BACKEND_URL=${{ env.PUBLIC_BACKEND_URL }}
tags: |
ksetcomp/fiskalna-2025-frontend:latest
ksetcomp/fiskalna-2025-frontend:${{ github.sha }}
build-backend:
needs: [lint-checkpoint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./backend
push: ${{ github.event_name != 'pull_request' }}
pull: true
tags: |
ksetcomp/fiskalna-2025-backend:latest
ksetcomp/fiskalna-2025-backend:${{ github.sha }}
notify-watchtower:
runs-on: ubuntu-latest
needs: [build-frontend, build-backend]
steps:
- name: Notify Watchtower
run: |
curl -sL -v \
--header 'Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}' \
"${{ vars.WATCHTOWER_URL }}/v1/update"