# What - Bumps backend dependencies, including Spring Boot to v4.1.0 # Why - Service hygiene. Reviewed-on: #2
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
name: Build App Candidate
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push-app:
|
|
name: Build & Push App
|
|
runs-on: easynode-debian
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ github.ref }}
|
|
|
|
- name: Set up Docker Buildx
|
|
run: docker buildx inspect --bootstrap
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract metadata for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: rmcampos/tasknote-app
|
|
tags: |
|
|
type=raw,value=candidate
|
|
|
|
- name: Generate version tag
|
|
id: version
|
|
run: |
|
|
DATE=$(date +'%Y.%m.%d')
|
|
TAG="app-v${DATE}.${{ github.run_number }}"
|
|
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
|
echo "Generated tag: ${TAG}"
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./client
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=registry,ref=rmcampos/tasknote-app:buildcache
|
|
cache-to: type=registry,ref=rmcampos/tasknote-app:buildcache,mode=max
|
|
build-args: |
|
|
VITE_BUILD=${{ steps.version.outputs.tag }}
|