From ac8649e48eae73c5e6e83916080c33a949b78971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Fri, 28 Mar 2025 19:07:24 +0100 Subject: [PATCH 1/2] ci: debos: upload artifacts to fileserver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create an unique id based on repository, workflow run id, and workflow run attempt. Repository name is under the control of the submitter, but GitHub restricts organization and repository names to safe characters. Signed-off-by: Loïc Minier --- .github/workflows/debos.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/debos.yml b/.github/workflows/debos.yml index ca1c8273..f9a5a97a 100644 --- a/.github/workflows/debos.yml +++ b/.github/workflows/debos.yml @@ -26,6 +26,8 @@ defaults: env: INCUS_IMAGE: images:debian/trixie/arm64 INCUS_NAME: debos + FILESERVER_DIR: /srv/gh-runners/quic-yocto/builds + FILESERVER_URL: https://quic-yocto-fileserver-1029608027416.us-central1.run.app # cancel in progress builds for this workflow triggered by the same ref concurrency: @@ -97,3 +99,21 @@ jobs: EOF ) | sudo incus exec "${INCUS_NAME}" -- sh + - name: Upload artifacts to fileserver + run: | + set -x + # curl will be used to talk to fileserver; should be installed by + # default + sudo apt -y install curl + # github runs are only unique per repository and may also be re-run; + # create an unique id with repository, run id, and run attempt + id="${GITHUB_REPOSITORY}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}" + # create a directory for the current run + dir="${FILESERVER_DIR}/${id}" + mkdir -vp "${dir}" + # copy output files + cp -v disk.img "${dir}" + # instruct fileserver to publish this directory + url="${FILESERVER_URL}/${id}/" + curl -X POST -H 'Accept: text/event-stream' "${url}" + From 8b0d0bdeece2d8fb70d36fb409b543f9acdd58c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Mon, 31 Mar 2025 11:18:26 +0200 Subject: [PATCH 2/2] ci: debos: Consistent APT calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc Minier --- .github/workflows/debos.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/debos.yml b/.github/workflows/debos.yml index f9a5a97a..426ca302 100644 --- a/.github/workflows/debos.yml +++ b/.github/workflows/debos.yml @@ -74,8 +74,9 @@ jobs: # these commands are run inside the container cat <