Skip to content

Commit 2f68a5d

Browse files
committed
ci: Move debos.yml to use publish helper
Signed-off-by: Andy Doan <[email protected]>
1 parent 0ce77b6 commit 2f68a5d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

.github/workflows/debos.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
# permissions to none
1212
permissions:
1313
contents: read
14+
security-events: read # This is required to handle authentication to our artifact publishing API
1415

1516
env:
1617
# github runs are only unique per repository and may also be re-run; create a
@@ -31,7 +32,6 @@ jobs:
3132
container:
3233
image: debian:trixie
3334
volumes:
34-
- /srv/gh-runners/quic-yocto/builds:/fileserver-builds
3535
- /srv/gh-runners/quic-yocto/downloads:/fileserver-downloads
3636
options: --privileged
3737
steps:
@@ -95,30 +95,30 @@ jobs:
9595
9696
- name: Upload artifacts to fileserver space for builds
9797
id: upload_artifacts
98+
env:
99+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98100
run: |
99101
set -ux
100-
# curl will be used to talk to fileserver; should be installed by
101-
# default
102-
apt -y install curl
102+
# python3-requests is used by publish_aritfacts.py
103+
apt -y install python3-requests
103104
# create a directory for the current run
104-
dir="/fileserver-builds/${BUILD_ID}"
105-
mkdir -vp "${dir}"
105+
export BUILD_DIR="/tmp/${BUILD_ID}"
106+
mkdir -vp "${BUILD_DIR}"
106107
# copy output files
107-
cp -av rootfs.tar.gz "${dir}"
108-
cp -av dtbs.tar.gz "${dir}"
109-
cp -av disk-ufs.img.gz "${dir}"
110-
cp -av disk-sdcard.img.gz "${dir}"
108+
cp -av rootfs.tar.gz "${BUILD_DIR}"
109+
cp -av dtbs.tar.gz "${BUILD_DIR}"
110+
cp -av disk-ufs.img.gz "${BUILD_DIR}"
111+
cp -av disk-sdcard.img.gz "${BUILD_DIR}"
111112
# TODO: separate flash_* directories between UFS and eMMC
112-
tar -cvf "${dir}"/flash-ufs.tar.gz \
113+
tar -cvf "${BUILD_DIR}"/flash-ufs.tar.gz \
113114
disk-ufs.img1 \
114115
disk-ufs.img2 \
115116
flash_rb3*
116-
tar -cvf "${dir}"/flash-emmc.tar.gz \
117+
tar -cvf "${BUILD_DIR}"/flash-emmc.tar.gz \
117118
disk-sdcard.img1 \
118119
disk-sdcard.img2 \
119120
flash_rb1*
120121
# instruct fileserver to publish this directory
121-
url="${FILESERVER_URL}/${BUILD_ID}/"
122-
curl -X POST -H 'Accept: text/event-stream' "${url}"
123-
echo "url=\"${url}\"" >> $GITHUB_OUTPUT
124-
122+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
123+
.github/workflows/publish_artifacts.py
124+
echo Image available at: ${URL}

0 commit comments

Comments
 (0)