feat: refactor ci

- Docker images support amd64 and arm64 architectures
- The web interface is built using github actions
- Use Alpine as the base image to compress the image size
This commit is contained in:
DDSRem
2024-07-22 13:57:24 +08:00
parent 6114e541c0
commit c42f9637fb
2 changed files with 30 additions and 20 deletions

View File

@@ -9,7 +9,14 @@ jobs:
build_and_deploy_docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set Up QEMU
uses: docker/setup-qemu-action@v3
- name: Set Up Buildx
uses: docker/setup-buildx-action@v3
- name: Login to image repository
uses: docker/login-action@v2
with:
@@ -17,9 +24,26 @@ jobs:
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
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
platforms: |
linux/amd64
linux/arm64
push: true
tags: ghcr.io/simon-ding/polaris:latest