Skip to content

Commit d3f4878

Browse files
committed
ci: Use publisher helper for u-boot.yml
By publishing this way, we are no longer dependent on NFS file share. This will make it easier to transition to the new IT provided self-hosted runners. Signed-off-by: Andy Doan <[email protected]>
1 parent 3601a9c commit d3f4878

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

.github/workflows/u-boot.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
# permissions to none
99
permissions:
1010
contents: read
11+
security-events: read # This is required to handle authentication to our artifact publishing API
1112

1213
env:
1314
# where results will be posted/hosted
@@ -55,25 +56,25 @@ jobs:
5556
scripts/build-u-boot-rb1.sh
5657
5758
- name: Upload results to fileserver
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5861
run: |
5962
set -ux
60-
# curl will be used to talk to fileserver; should be installed by
61-
# default
62-
apt -y install curl
63-
for dir in "/fileserver-builds/${BUILD_ID}" \
64-
"/fileserver-downloads/qcom-deb-images/u-boot-rb1-latest"; do
65-
mkdir -vp "${dir}"
66-
cp -av \
67-
u-boot/u-boot-nodtb.bin.gz \
68-
u-boot/dts/upstream/src/arm64/qcom/qrb2210-rb1.dtb \
69-
u-boot/u-boot-nodtb.bin.gz-dtb \
70-
u-boot/u-boot.bin \
71-
u-boot/rb1-boot.img \
72-
"${dir}"
73-
done
63+
# python3-requests is used by publish_aritfacts.py
64+
apt -y install python3-requests
65+
66+
export BUILD_DIR="/fileserver-downloads/qcom-deb-images/u-boot-rb1-latest"
67+
mkdir -vp ${BUILD_DIR}
68+
cp -av \
69+
u-boot/u-boot-nodtb.bin.gz \
70+
u-boot/dts/upstream/src/arm64/qcom/qrb2210-rb1.dtb \
71+
u-boot/u-boot-nodtb.bin.gz-dtb \
72+
u-boot/u-boot.bin \
73+
u-boot/rb1-boot.img \
74+
${BUILD_DIR}
7475
# perhaps help NFS sync
7576
sync
7677
# instruct fileserver to publish this directory
77-
url="${FILESERVER_URL}/${BUILD_ID}/"
78-
curl -X POST -H 'Accept: text/event-stream' "${url}"
79-
78+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
79+
.github/workflows/publish_artifacts.py
80+
echo Image available at: ${URL}

0 commit comments

Comments
 (0)