|
11 | 11 | # permissions to none |
12 | 12 | permissions: |
13 | 13 | contents: read |
| 14 | + security-events: read # This is required to handle authentication to our artifact publishing API |
14 | 15 |
|
15 | 16 | env: |
16 | 17 | # github runs are only unique per repository and may also be re-run; create a |
|
31 | 32 | container: |
32 | 33 | image: debian:trixie |
33 | 34 | volumes: |
34 | | - - /srv/gh-runners/quic-yocto/builds:/fileserver-builds |
35 | 35 | - /srv/gh-runners/quic-yocto/downloads:/fileserver-downloads |
36 | 36 | options: --privileged |
37 | 37 | steps: |
@@ -95,30 +95,30 @@ jobs: |
95 | 95 |
|
96 | 96 | - name: Upload artifacts to fileserver space for builds |
97 | 97 | id: upload_artifacts |
| 98 | + env: |
| 99 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
98 | 100 | run: | |
99 | 101 | 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 |
103 | 104 | # 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}" |
106 | 107 | # 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}" |
111 | 112 | # 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 \ |
113 | 114 | disk-ufs.img1 \ |
114 | 115 | disk-ufs.img2 \ |
115 | 116 | flash_rb3* |
116 | | - tar -cvf "${dir}"/flash-emmc.tar.gz \ |
| 117 | + tar -cvf "${BUILD_DIR}"/flash-emmc.tar.gz \ |
117 | 118 | disk-sdcard.img1 \ |
118 | 119 | disk-sdcard.img2 \ |
119 | 120 | flash_rb1* |
120 | 121 | # 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