57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
name: Build CI
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
channel: master
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ gitea.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: false
|
|
tags: phanipavank/prodbuilder:latest
|
|
platforms: linux/arm64, linux/amd64
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
outputs: type=local,dest=build/linux/*/release/bundle/prod
|
|
build-args: |
|
|
TARGETARCH=${{matrix.arch}}
|
|
|
|
# - name: Setup QEMU
|
|
# run: |
|
|
# sudo apt-get update -y
|
|
# sudo apt install -y qemu-user-static
|
|
# docker run --privileged --rm tonistiigi/binfmt --install all
|
|
|
|
# - name: Build app
|
|
# run: |
|
|
# docker run --rm --platform linux/amd64 -v ${{ gitea.workspace }}:/app -w /app ghcr.io/cirruslabs/flutter:3.38.9 bash -c "apt update -y && apt install -y ninja-build cmake clang libgtk-3-dev pkg-config && flutter doctor -v && flutter pub get && flutter build linux --release"
|
|
|
|
- name: ls everything
|
|
run: ls -R
|
|
|
|
- name: Save Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: PROD
|
|
path: ./prod
|