mirror of
https://github.com/compute-blade-community/compute-blade-agent.git
synced 2026-04-16 15:35:42 +02:00
* feat: add smart fanunit (serial) protocol Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: add rudimentary eventbus to ease implementation Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: smart fanunit client Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: initial smart fan unit implementation Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: improve logging, double btn press Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: testcases Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: context closure handling, RPM reporting Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: address linting issues Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: edge line closure Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * fix: reset CPU after i2c lockup Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> * feat: add uf2 to release Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com> --------- Signed-off-by: Matthias Riegler <matthias.riegler@ankorstore.com>
91 lines
2.5 KiB
YAML
91 lines
2.5 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
# Release-please for auto-updated PRs
|
|
release-please:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: google-github-actions/release-please-action@v3
|
|
id: release-please
|
|
with:
|
|
release-type: simple # actual releasing is handled by goreleaser
|
|
package-name: computeblade-agent
|
|
outputs:
|
|
release_created: ${{ steps.release-please.outputs.release_created }}
|
|
|
|
# Goreleaser for binary releases / GH release
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- release-please
|
|
if: needs.release-please.outputs.release_created
|
|
steps:
|
|
# Checkout code (full history)
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# Setup golang with caching
|
|
- name: Setup Golang
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: stable
|
|
- id: go-cache-paths
|
|
run: |
|
|
echo "go-build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
|
|
echo "go-mod=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
|
|
- name: Go Build Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
|
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
|
- name: Go Mod Cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
|
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
|
|
|
# Setup tinygo
|
|
- uses: acifani/setup-tinygo@v2
|
|
with:
|
|
tinygo-version: '0.30.0'
|
|
|
|
# Setup docker buildx
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: 'Login to GitHub Container Registry'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{github.actor}}
|
|
password: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
# Install cosign
|
|
- name: Install Cosign
|
|
uses: sigstore/cosign-installer@v3
|
|
|
|
# Build fanunit firmware
|
|
- name: Build FanUnit Firmware
|
|
run: make build-fanunit
|
|
|
|
# Run goreleaser
|
|
- name: Run Goreleaser
|
|
uses: goreleaser/goreleaser-action@v5
|
|
with:
|
|
version: latest
|
|
args: release --clean
|
|
env:
|
|
COSIGN_YES: "true"
|
|
KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|