feat: release build flutter use github action

This commit is contained in:
Simon Ding
2024-12-13 13:33:39 +08:00
parent 369263a55c
commit f2ac688ed8

View File

@@ -37,11 +37,24 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3
- name: Build Web
run: |
cd ui
flutter pub get
flutter build web --no-web-resources-cdn
- name: Build and push
id: push
@@ -50,10 +63,7 @@ jobs:
context: .
file: Dockerfile
push: true
platforms: |
linux/amd64
linux/arm64
linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x,linux/ppc64le,linux/riscv64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}