Skip to content

Commit 8fa55af

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 25ea9b9 commit 8fa55af

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

.github/workflows/build-daily.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99

1010
permissions:
1111
contents: read
12+
security-events: read # This is required to handle authentication to our artifact publishing API
1213

1314
jobs:
1415
build-daily:

.github/workflows/build-on-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55

66
permissions:
77
contents: read
8+
security-events: read # This is required to handle authentication to our artifact publishing API
89

910
jobs:
1011
build-pr:

.github/workflows/build-on-push.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
contents: read
9+
security-events: read # This is required to handle authentication to our artifact publishing API
910

1011
jobs:
1112
build-daily:

.github/workflows/u-boot.yml

Lines changed: 18 additions & 18 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
@@ -30,7 +31,6 @@ jobs:
3031
container:
3132
image: debian:trixie
3233
volumes:
33-
- /srv/gh-runners/quic-yocto/builds:/fileserver-builds
3434
- /srv/gh-runners/quic-yocto/downloads:/fileserver-downloads
3535
steps:
3636
- uses: actions/checkout@v4
@@ -55,25 +55,25 @@ jobs:
5555
scripts/build-u-boot-rb1.sh
5656
5757
- name: Upload results to fileserver
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5860
run: |
5961
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
62+
# python3-requests is used by publish_aritfacts.py
63+
apt -y install python3-requests
64+
65+
export BUILD_DIR="/fileserver-downloads/qcom-deb-images/u-boot-rb1-latest"
66+
mkdir -vp ${BUILD_DIR}
67+
cp -av \
68+
u-boot/u-boot-nodtb.bin.gz \
69+
u-boot/dts/upstream/src/arm64/qcom/qrb2210-rb1.dtb \
70+
u-boot/u-boot-nodtb.bin.gz-dtb \
71+
u-boot/u-boot.bin \
72+
u-boot/rb1-boot.img \
73+
${BUILD_DIR}
7474
# perhaps help NFS sync
7575
sync
7676
# instruct fileserver to publish this directory
77-
url="${FILESERVER_URL}/${BUILD_ID}/"
78-
curl -X POST -H 'Accept: text/event-stream' "${url}"
79-
77+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
78+
.github/workflows/publish_artifacts.py
79+
echo Image available at: ${URL}

0 commit comments

Comments
 (0)