forked from domo-iot/libp2p-rust-dht
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (42 loc) · 1.28 KB
/
cross.yaml
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
name: cross
on:
push:
branches: [ "master", "sqlx"]
tags:
- 'v*.*.*'
jobs:
cross-compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Cross
run: |
curl -L "https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz" |
tar xz -C $HOME/.cargo/bin
- name: Launch cross-compile.sh script
run: |
./cross-compile.sh
- name: Login to GitHub container registry (ghcr.io)
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push x86
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/sifis-home/sifis-alpine-dht-amd64:latest
context: target/x86_64-unknown-linux-musl/release
file: docker/Dockerfile-amd64
- name: Build and push arm64v8
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/sifis-home/sifis-alpine-dht-arm64v8:latest
context: target/aarch64-unknown-linux-musl/release
file: docker/Dockerfile-OpenWrt