All checks were successful
Build and Push Docker Image / build (push) Successful in 44s
32 lines
934 B
YAML
32 lines
934 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build deps
|
|
run: apt update && apt upgrade -y && apt install gcc-riscv64-unknown-elf libnewlib-dev libudev-dev libusb-1.0-0-dev git build-essential -y
|
|
|
|
- name: Clone ch32fun repo
|
|
run: |
|
|
mkdir -p $HOME/git/ch32fun
|
|
git clone https://github.com/cnlohr/ch32fun.git $HOME/git/ch32fun
|
|
|
|
- name: Compile binary
|
|
run: make
|
|
|
|
- name: Upload firmware to Gitea Generic Registry
|
|
run: |
|
|
VERSION="${GITEA_SHA:-$GITHUB_SHA}"
|
|
|
|
curl --user "${{ gitea.actor }}:${{ vars.OCI_ACCESS_TOKEN }}" \
|
|
--upload-file build/fan_controller.bin \
|
|
"https://git.drath.cc/api/packages/${{ gitea.actor }}/generic/firmware/${VERSION}/fan_controller.bin" |