Skip to content

Commit

Permalink
feat: build flutter use github action
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ding committed Dec 13, 2024
1 parent f7e82fa commit 9d48481
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 9d48481

Please sign in to comment.