Port CI from GitLab CI to Forgejo Actions
All checks were successful
CI / build (push) Successful in 3m30s
CI / docker (push) Successful in 0s
CI / build_image (push) Successful in 4m50s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jonas Leder 2026-11-18 10:50:47 +01:00
commit d24bf3f627
2 changed files with 36 additions and 20 deletions

36
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,36 @@
name: CI
on:
push:
branches: ["**"]
tags: ["**"]
workflow_dispatch:
# Build number = run number + 170 (last GitLab pipeline iid) so it keeps growing.
jobs:
docker:
uses: infra/ci-snippets/.forgejo/workflows/docker-build.yml@master
secrets: inherit
build_image:
runs-on: default
steps:
- uses: https://code.forgejo.org/actions/checkout@v7
- uses: https://code.forgejo.org/actions/setup-python@v7
with:
python-version: '3'
- name: Build firmware
env:
RUN_NUMBER: ${{ github.run_number }}
run: |
pip install -U platformio
echo "#define BUILD_NUMBER $((RUN_NUMBER + 170))
#define BUILD_DATE \"$(date '+%Y-%m-%d %H:%M:%S')\"
#define BUILD_BRANCH \"$GITHUB_REF_NAME\"
#define BUILD_COMMIT \"$(echo $GITHUB_SHA | cut -c1-8)\"" | tee lib/buildinfo/buildinfo.h
pio run
mv .pio/build/heltec_wifi_lora_32_V3/firmware.bin firmware.bin
- uses: https://code.forgejo.org/forgejo/upload-artifact@v4
with:
name: firmware
path: firmware.bin

View file

@ -1,20 +0,0 @@
build_image:
stage: build
image: python:3
before_script:
- pip install -U platformio
script:
- |
echo "#define BUILD_NUMBER $CI_PIPELINE_IID
#define BUILD_DATE \"$(date '+%Y-%m-%d %H:%M:%S')\"
#define BUILD_BRANCH \"$CI_COMMIT_REF_NAME\"
#define BUILD_COMMIT \"$(echo $CI_COMMIT_SHA| cut -c1-8)\"" | tee lib/buildinfo/buildinfo.h
- pio run
- mv .pio/build/heltec_wifi_lora_32_V3/firmware.bin firmware.bin
artifacts:
paths:
- firmware.bin
include:
- project: 'infra/ci'
file: '/pipelines/docker.yml'