Skip to content

Commit 3d0e34e

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

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/debos.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
# permissions to none
1818
permissions:
1919
contents: read
20+
security-events: read # This is required to handle authentication to our artifact publishing API
2021

2122
env:
2223
# github runs are only unique per repository and may also be re-run; create a
@@ -100,27 +101,24 @@ jobs:
100101
- name: Upload artifacts to fileserver space for builds
101102
run: |
102103
set -ux
103-
# curl will be used to talk to fileserver; should be installed by
104-
# default
105-
apt -y install curl
106104
# create a directory for the current run
107-
dir="/fileserver-builds/${BUILD_ID}"
108-
mkdir -vp "${dir}"
105+
export BUILD_DIR="/tmp/${BUILD_ID}"
106+
mkdir -vp "${BUILD_DIR}"
109107
# copy output files
110-
cp -av rootfs.tar.gz "${dir}"
111-
cp -av dtbs.tar.gz "${dir}"
112-
cp -av disk-ufs.img.gz "${dir}"
113-
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}"
114112
# TODO: separate flash_* directories between UFS and eMMC
115-
tar -cvf "${dir}"/flash-ufs.tar.gz \
113+
tar -cvf "${BUILD_DIR}"/flash-ufs.tar.gz \
116114
disk-ufs.img1 \
117115
disk-ufs.img2 \
118116
flash_rb3*
119-
tar -cvf "${dir}"/flash-emmc.tar.gz \
117+
tar -cvf "${BUILD_DIR}"/flash-emmc.tar.gz \
120118
disk-sdcard.img1 \
121119
disk-sdcard.img2 \
122120
flash_rb1*
123121
# instruct fileserver to publish this directory
124-
url="${FILESERVER_URL}/${BUILD_ID}/"
125-
curl -X POST -H 'Accept: text/event-stream' "${url}"
126-
122+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
123+
.github/workflows/publish_artifacts.py
124+
echo Image available at: ${URL}

0 commit comments

Comments
 (0)