mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 11:39:46 +08:00
feat: build flutter use github action
This commit is contained in:
13
.github/workflows/go.yml
vendored
13
.github/workflows/go.yml
vendored
@@ -29,6 +29,19 @@ jobs:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
|
||||
- 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: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
FROM instrumentisto/flutter:3 AS flutter
|
||||
WORKDIR /app
|
||||
COPY ./ui/pubspec.yaml ./ui/pubspec.lock ./
|
||||
RUN flutter pub get
|
||||
COPY ./ui/ ./
|
||||
RUN flutter build web --no-web-resources-cdn
|
||||
|
||||
# 打包依赖阶段使用golang作为基础镜像
|
||||
FROM golang:1.23 as builder
|
||||
|
||||
# 启用go module
|
||||
|
||||
Reference in New Issue
Block a user