release.yml, build-sd-images.yml: Add armbian testimage build

This commit is contained in:
Tobias Knöppler 2025-10-12 18:04:31 +02:00
parent a53f800d02
commit 5f38f64336
2 changed files with 34 additions and 1 deletions

View File

@ -15,6 +15,10 @@ on:
required: false
default: true
type: boolean
test_image_url:
required: false
type: string
default: ""
outputs:
artifact_name:
value: "${{ jobs.build.outputs.artifact_name }}"
@ -63,7 +67,13 @@ jobs:
# which qemu-aarch64-static
# update-binfmts --display qemu-aarch64
# update-binfmts --display qemu-arm
- name: "Skip build"
if: "${{ inputs.test_image_url != '' }}"
run: |
echo "artifact_file=NextcloudPi_TestImage_${VERSION//\//_}.img" >> $GITHUB_OUTPUT
echo "ARTIFACT_FILE=NextcloudPi_TestImage_${VERSION//\//_}.img" >> $GITHUB_ENV
- name: "Build Armbian"
if: "${{ inputs.test_image_url == '' }}"
id: build-armbian
continue-on-error: true
run: |
@ -103,6 +113,7 @@ jobs:
name: ${{ github.run_id }}-${{ inputs.board_id }}-logs
path: armbian/output
- name: upload image to artifact store
if: "${{ inputs.test_image_url == '' }}"
uses: actions/upload-artifact@v4
with:
name: ${{ github.run_id }}-${{ inputs.board_id }}-image
@ -135,9 +146,16 @@ jobs:
with:
ref: "${{ env.VERSION }}"
- uses: actions/download-artifact@v4
if: "${{ inputs.test_image_url == '' }}"
with:
name: ${{ env.ARTIFACT_ID }}
path: output
- name: Download Test Image
if: "${{ inputs.test_image_url != '' }}"
run: |
set -ex
mkdir -p output
wget -nv "${{ inputs.test_image_url }}" | pv -i 3 > "output/${ARTIFACT_FILE?}"
- name: Prepare test
run: |
set -x

View File

@ -26,6 +26,11 @@ on:
description: 'Release images to GH'
required: false
default: false
test_image_url:
type: string
description: 'URL for test image to test instead of actual armbian builds'
required: false
default: ''
push:
tags:
- "v*"
@ -68,7 +73,7 @@ jobs:
secrets: inherit
raspberrypi-5:
if: ${{ inputs.sd-images || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}
if: ${{ false && inputs.sd-images || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}
uses: ./.github/workflows/build-sd-images.yml
with:
git_ref: "${{ inputs.git_ref || github.head_ref || github.ref_name }}"
@ -76,6 +81,16 @@ jobs:
board_name: RaspberryPi5
secrets: inherit
armbian-test-image:
if: ${{ inputs.test_image_url != '' || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}
uses: ./.github/workflows/build-sd-images.yml
with:
git_ref: "${{ inputs.git_ref || github.head_ref || github.ref_name }}"
board_id: testimage
board_name: TestImage
test_image_url: "${{ inputs.test_image_url }}"
secrets: inherit
# TODO: Fix 32bit armbian images
odroidxu4:
# if: ${{ inputs.sd-images || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}