-
Notifications
You must be signed in to change notification settings - Fork 348
69 lines (59 loc) · 1.7 KB
/
offline-package.yml
File metadata and controls
69 lines (59 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Offline Package
on:
workflow_dispatch:
inputs:
docker_version:
description: Docker static binary version
required: false
default: "29.0.4"
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
package:
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
artifact: monkeycode-offline-linux-amd64
- arch: arm64
artifact: monkeycode-offline-linux-arm64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.25.8"
cache-dependency-path: backend/go.sum
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml
- name: Build frontend dist
working-directory: frontend
run: |
pnpm install --frozen-lockfile
pnpm run build
rm -rf docker/dist
mkdir -p docker/dist
cp -R dist/. docker/dist/
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build offline package
working-directory: backend
env:
ARCH: ${{ matrix.arch }}
DOCKER_VERSION: ${{ inputs.docker_version || '29.0.4' }}
PACKAGE_TGZ: "true"
run: ./scripts/build-offline-package.sh
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.artifact }}
path: backend/dist/offline/${{ matrix.artifact }}.tgz
archive: false
if-no-files-found: error