-
Notifications
You must be signed in to change notification settings - Fork 4
81 lines (77 loc) · 2.31 KB
/
spa-server-cd.yml
File metadata and controls
81 lines (77 loc) · 2.31 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
70
71
72
73
74
75
76
77
78
79
80
81
name: spa-server release
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
jobs:
client:
uses: ./.github/workflows/spa-client-build.yml
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GithubPackages
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push spa-server
uses: docker/build-push-action@v2
with:
context: .
#platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ env.REGISTRY }}/fornetcode/spa-server:${{github.ref_name}}, ${{ env.REGISTRY }}/fornetcode/spa-server:latest
# - name: build and push spa-server with S3
# uses: docker/build-push-action@v2
# with:
# context: "{{defaultContext}}:docker"
# file: S3FS.Dockerfile
# push: true
# cache-from: type=gha
# cache-to: type=gha,mode=max
# tags: ${{ env.REGISTRY }}/fornetcode/spa-server:${{github.event.inputs.version}}-s3
binFile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Setup MUSL
run: |
rustup target add x86_64-unknown-linux-musl
sudo apt-get -qq install musl-tools
- name: Build Release Linux
run: make release-linux-server-musl
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ./release/*
name: spa-server-linux-musl
if-no-files-found: error
release:
runs-on: ubuntu-latest
needs: [client, docker, binFile]
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: list artifacts
run: ls -R artifacts
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "artifacts/**/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true