-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (64 loc) · 2.23 KB
/
build.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
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
#
name: Create and publish hybrid-runtime binaries
# Configures this workflow to run every time a release is created
on:
release:
types: [published]
#push:
# branches: ['main']
jobs:
build3:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and export
uses: docker/build-push-action@v6
with:
file: docker/runtime.dockerfile
tags: myimage:latest
push: false
load: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and push
uses: docker/build-push-action@v6
with:
context: cortexm_console
file: cortexm_console/Dockerfile
platforms: linux/arm64
tags: mybuild:latest
push: false
load: true
- uses: shrink/actions-docker-extract@v3
id: extract
with:
image: mybuild:latest
path: /cortexm_console
destination: dist
- name: build binary
uses: addnab/docker-run-action@v3
with:
image: myimage:latest
options: -v ${{ github.workspace }}:/runtime -w /runtime/runtime/shim
run: |
cargo build --target aarch64-unknown-linux-musl
- name: build binary
uses: addnab/docker-run-action@v3
with:
image: myimage:latest
options: -v ${{ github.workspace }}:/runtime -w /runtime/runtime/runtime
run: |
cargo build --target aarch64-unknown-linux-musl
- name: Tar release
run: |
tar -cvf hybrid.tar -C ${{ github.workspace }}/runtime/shim/target/aarch64-unknown-linux-musl/debug containerd-shim-containerd-hybrid
tar -rvf hybrid.tar -C ${{ github.workspace }}/runtime/runtime/target/aarch64-unknown-linux-musl/debug hybrid-cli
tar -rvf hybrid.tar -C ${{ github.workspace }}/runtime pause.sh resize.sh
tar -rvf hybrid.tar -C ${{ github.workspace }}/dist cortexm_console
gzip hybrid.tar
- name: Release with Notes
uses: softprops/action-gh-release@v1
with:
files: |
hybrid.tar.gz