Skip to content

Commit e6fa544

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

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

.github/workflows/debos.yml

Lines changed: 16 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
@@ -98,29 +99,30 @@ jobs:
9899
debos-recipes/qualcomm-linux-debian-flash.yaml
99100
100101
- name: Upload artifacts to fileserver space for builds
102+
env:
103+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101104
run: |
102105
set -ux
103-
# curl will be used to talk to fileserver; should be installed by
104-
# default
105-
apt -y install curl
106+
# python3-requests is used by publish_aritfacts.py
107+
apt -y install python3-requests
106108
# create a directory for the current run
107-
dir="/fileserver-builds/${BUILD_ID}"
108-
mkdir -vp "${dir}"
109+
export BUILD_DIR="/tmp/${BUILD_ID}"
110+
mkdir -vp "${BUILD_DIR}"
109111
# 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}"
112+
cp -av rootfs.tar.gz "${BUILD_DIR}"
113+
cp -av dtbs.tar.gz "${BUILD_DIR}"
114+
cp -av disk-ufs.img.gz "${BUILD_DIR}"
115+
cp -av disk-sdcard.img.gz "${BUILD_DIR}"
114116
# TODO: separate flash_* directories between UFS and eMMC
115-
tar -cvf "${dir}"/flash-ufs.tar.gz \
117+
tar -cvf "${BUILD_DIR}"/flash-ufs.tar.gz \
116118
disk-ufs.img1 \
117119
disk-ufs.img2 \
118120
flash_rb3*
119-
tar -cvf "${dir}"/flash-emmc.tar.gz \
121+
tar -cvf "${BUILD_DIR}"/flash-emmc.tar.gz \
120122
disk-sdcard.img1 \
121123
disk-sdcard.img2 \
122124
flash_rb1*
123125
# instruct fileserver to publish this directory
124-
url="${FILESERVER_URL}/${BUILD_ID}/"
125-
curl -X POST -H 'Accept: text/event-stream' "${url}"
126-
126+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
127+
.github/workflows/publish_artifacts.py
128+
echo Image available at: ${URL}

0 commit comments

Comments
 (0)