-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 1.63 KB
/
client_build_arm64.yml
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
name: fornet arm64 client build
on:
workflow_dispatch:
inputs:
version:
required: true
description: "docker version to release"
env:
REGISTRY: ghcr.io
jobs:
docker-and-linux:
runs-on: macos-13-xlarge
steps:
- uses: actions/checkout@v3
with:
submodules: true
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to GithubPackages
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: build and push docker image
uses: docker/build-push-action@v2
with:
context: .
#platforms: linux/amd64,linux/arm64
push: true
file: command/docker/client/client.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ env.REGISTRY }}/fornetcode/fornet:${{github.event.inputs.version}}
- name: copy binary from docker to release directory
run: |
mkdir -p release
docker run --rm -v ./release:/release ${{ env.REGISTRY }}/fornetcode/fornet:${{github.event.inputs.version}} cp /bin/fornet:/release/ && cp /bin/fornet-cli:/release
cd release && tar -czvf release/fornet-linux-aarch64.tar.gz ./fornet ./fornet-cli && rm fornet && rm fornet-cli
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: fornet-linux-aarch64.tar.gz
path: release/fornet-aarch64-unknown-linux-gnu.tar.gz
if-no-files-found: error