Skip to content

Commit 5f38f64

Browse files
committed
release.yml, build-sd-images.yml: Add armbian testimage build
1 parent a53f800 commit 5f38f64

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/build-sd-images.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
required: false
1616
default: true
1717
type: boolean
18+
test_image_url:
19+
required: false
20+
type: string
21+
default: ""
1822
outputs:
1923
artifact_name:
2024
value: "${{ jobs.build.outputs.artifact_name }}"
@@ -63,7 +67,13 @@ jobs:
6367
# which qemu-aarch64-static
6468
# update-binfmts --display qemu-aarch64
6569
# update-binfmts --display qemu-arm
70+
- name: "Skip build"
71+
if: "${{ inputs.test_image_url != '' }}"
72+
run: |
73+
echo "artifact_file=NextcloudPi_TestImage_${VERSION//\//_}.img" >> $GITHUB_OUTPUT
74+
echo "ARTIFACT_FILE=NextcloudPi_TestImage_${VERSION//\//_}.img" >> $GITHUB_ENV
6675
- name: "Build Armbian"
76+
if: "${{ inputs.test_image_url == '' }}"
6777
id: build-armbian
6878
continue-on-error: true
6979
run: |
@@ -103,6 +113,7 @@ jobs:
103113
name: ${{ github.run_id }}-${{ inputs.board_id }}-logs
104114
path: armbian/output
105115
- name: upload image to artifact store
116+
if: "${{ inputs.test_image_url == '' }}"
106117
uses: actions/upload-artifact@v4
107118
with:
108119
name: ${{ github.run_id }}-${{ inputs.board_id }}-image
@@ -135,9 +146,16 @@ jobs:
135146
with:
136147
ref: "${{ env.VERSION }}"
137148
- uses: actions/download-artifact@v4
149+
if: "${{ inputs.test_image_url == '' }}"
138150
with:
139151
name: ${{ env.ARTIFACT_ID }}
140152
path: output
153+
- name: Download Test Image
154+
if: "${{ inputs.test_image_url != '' }}"
155+
run: |
156+
set -ex
157+
mkdir -p output
158+
wget -nv "${{ inputs.test_image_url }}" | pv -i 3 > "output/${ARTIFACT_FILE?}"
141159
- name: Prepare test
142160
run: |
143161
set -x

.github/workflows/release.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ on:
2626
description: 'Release images to GH'
2727
required: false
2828
default: false
29+
test_image_url:
30+
type: string
31+
description: 'URL for test image to test instead of actual armbian builds'
32+
required: false
33+
default: ''
2934
push:
3035
tags:
3136
- "v*"
@@ -68,14 +73,24 @@ jobs:
6873
secrets: inherit
6974

7075
raspberrypi-5:
71-
if: ${{ inputs.sd-images || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}
76+
if: ${{ false && inputs.sd-images || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}
7277
uses: ./.github/workflows/build-sd-images.yml
7378
with:
7479
git_ref: "${{ inputs.git_ref || github.head_ref || github.ref_name }}"
7580
board_id: rpi5b
7681
board_name: RaspberryPi5
7782
secrets: inherit
7883

84+
armbian-test-image:
85+
if: ${{ inputs.test_image_url != '' || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}
86+
uses: ./.github/workflows/build-sd-images.yml
87+
with:
88+
git_ref: "${{ inputs.git_ref || github.head_ref || github.ref_name }}"
89+
board_id: testimage
90+
board_name: TestImage
91+
test_image_url: "${{ inputs.test_image_url }}"
92+
secrets: inherit
93+
7994
# TODO: Fix 32bit armbian images
8095
odroidxu4:
8196
# if: ${{ inputs.sd-images || ( github.event_name != 'workflow_dispatch' && !startsWith(github.ref_name, 'docker-') ) }}

0 commit comments

Comments
 (0)