Skip to content

Build and Release Web version v1.0.1 #14

Build and Release Web version v1.0.1

Build and Release Web version v1.0.1 #14

Workflow file for this run

run-name: "Build and Release Web version ${{ github.ref_name }}"
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
workflow_dispatch:
jobs:
build:
name: Build & Release Web version
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Gradle Java Home
run: sed -i '$d' frontend/android/gradle.properties
- name: Set Up Java
uses: actions/setup-java@v3
with:
distribution: "oracle"
java-version: "17"
cache: gradle
- name: Set Up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.27.2"
channel: "stable"
cache: true
- name: Install Dependencies
run: |
cd frontend
flutter pub get
- name: Build Web Files
run: |
cd frontend && flutter build web
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get metadata for frontend docker image
id: meta-frontend
uses: docker/metadata-action@v5
with:
images: ghcr.io/dk10ws/slcm-frontend
- name: Build and Push frontend Docker Image
uses: docker/build-push-action@v6
with:
context: frontend
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-frontend.outputs.tags }}
labels: ${{ steps.meta-frontend.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/dk10ws/slcm-frontend:buildcache
cache-to: type=registry,ref=ghcr.io/dk10ws/slcm-frontend:buildcache,mode=max
- name: Get metadata for backend Docker image
id: meta-backend
uses: docker/metadata-action@v5
with:
images: ghcr.io/dk10ws/slcm-backend
- name: Build and Push backend Docker Image
uses: docker/build-push-action@v6
with:
context: backend
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta-backend.outputs.tags }}
labels: ${{ steps.meta-backend.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/dk10ws/slcm-backend:buildcache
cache-to: type=registry,ref=ghcr.io/dk10ws/slcm-backend:buildcache,mode=max