Skip to content

Commit ef1f5f6

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

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.github/workflows/debos.yml

Lines changed: 16 additions & 15 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
@@ -95,30 +96,30 @@ jobs:
9596
9697
- name: Upload artifacts to fileserver space for builds
9798
id: upload_artifacts
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98101
run: |
99102
set -ux
100-
# curl will be used to talk to fileserver; should be installed by
101-
# default
102-
apt -y install curl
103+
# python3-requests is used by publish_aritfacts.py
104+
apt -y install python3-requests
103105
# create a directory for the current run
104-
dir="/fileserver-builds/${BUILD_ID}"
105-
mkdir -vp "${dir}"
106+
export BUILD_DIR="/tmp/${BUILD_ID}"
107+
mkdir -vp "${BUILD_DIR}"
106108
# 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}"
109+
cp -av rootfs.tar.gz "${BUILD_DIR}"
110+
cp -av dtbs.tar.gz "${BUILD_DIR}"
111+
cp -av disk-ufs.img.gz "${BUILD_DIR}"
112+
cp -av disk-sdcard.img.gz "${BUILD_DIR}"
111113
# TODO: separate flash_* directories between UFS and eMMC
112-
tar -cvf "${dir}"/flash-ufs.tar.gz \
114+
tar -cvf "${BUILD_DIR}"/flash-ufs.tar.gz \
113115
disk-ufs.img1 \
114116
disk-ufs.img2 \
115117
flash_rb3*
116-
tar -cvf "${dir}"/flash-emmc.tar.gz \
118+
tar -cvf "${BUILD_DIR}"/flash-emmc.tar.gz \
117119
disk-sdcard.img1 \
118120
disk-sdcard.img2 \
119121
flash_rb1*
120122
# 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-
123+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
124+
.github/workflows/publish_artifacts.py
125+
echo Image available at: ${URL}

0 commit comments

Comments
 (0)