Files
polaris/.github/workflows/go.yml
DDSRem c42f9637fb 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
2024-07-22 13:57:24 +08:00

56 lines
1.2 KiB
YAML

name: build
on:
push:
branches: [ main ]
jobs:
build_and_deploy_docker:
runs-on: ubuntu-latest
steps:
- 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:
registry: ghcr.io
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
# - name: Set up Go
# uses: actions/setup-go@v3
# with:
# go-version: '>=1.20.0'
# - name: Build
# run: go build -v ./...