|
17 | 17 | # permissions to none |
18 | 18 | permissions: |
19 | 19 | contents: read |
| 20 | + security-events: read # This is required to handle authentication to our artifact publishing API |
20 | 21 |
|
21 | 22 | env: |
22 | 23 | # github runs are only unique per repository and may also be re-run; create a |
@@ -98,29 +99,30 @@ jobs: |
98 | 99 | debos-recipes/qualcomm-linux-debian-flash.yaml |
99 | 100 |
|
100 | 101 | - name: Upload artifacts to fileserver space for builds |
| 102 | + env: |
| 103 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
101 | 104 | run: | |
102 | 105 | 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 |
106 | 108 | # 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}" |
109 | 111 | # 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}" |
114 | 116 | # 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 \ |
116 | 118 | disk-ufs.img1 \ |
117 | 119 | disk-ufs.img2 \ |
118 | 120 | flash_rb3* |
119 | | - tar -cvf "${dir}"/flash-emmc.tar.gz \ |
| 121 | + tar -cvf "${BUILD_DIR}"/flash-emmc.tar.gz \ |
120 | 122 | disk-sdcard.img1 \ |
121 | 123 | disk-sdcard.img2 \ |
122 | 124 | flash_rb1* |
123 | 125 | # 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