-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (38 loc) · 1.71 KB
/
pi.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
# This workflow makes a 64 bit Raspberry Pi Arch Linux Image.
# It does not have the security issues mentioned here: https://github.com/tendermint/tendermint/blob/master/docs/tendermint-core/running-in-production.md#validator-signing-on-32-bit-architectures-or-arm
# Later, more devices will be supported, as well.
# The "base" is built by: https://github.com/faddat/sos
# The base image is located at: https://hub.docker.com/r/faddat/spos
# TODO: Replace this with a system that fetches SOS-light, loop-mounts the image, modifies hostname, adds docker compose run, and exits.
name: Rpi
on: [push, pull_request]
jobs:
pi:
name: oracle Pi
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: Set up QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Image in Docker
run: docker buildx build --tag oracle --file .pi/Dockerfile --platform linux/arm64 --cache-from ${{ secrets.DOCKERHUB_USERNAME }}/oracle:picache --cache-to ${{ secrets.DOCKERHUB_USERNAME }}/oracle:picache --load --progress tty .
- name: Build Image
run: bash .pi/build.sh
- name: Compress
run: xz -T $(nproc) images/oracle.img
- name: Upload image
uses: actions/upload-artifact@v2
with:
name: Starport Pi
path: images/oracle.img.xz