Skip to content

Commit 0ce77b6

Browse files
committed
ci: Use publisher helper for linux.yml
Signed-off-by: Andy Doan <[email protected]>
1 parent 8fa55af commit 0ce77b6

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/linux.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111
# permissions to none
1212
permissions:
1313
contents: read
14+
security-events: read # This is required to handle authentication to our artifact publishing API
1415

1516
env:
1617
# where results will be posted/hosted
@@ -33,7 +34,6 @@ jobs:
3334
container:
3435
image: debian:trixie
3536
volumes:
36-
- /srv/gh-runners/quic-yocto/builds:/fileserver-builds
3737
- /srv/gh-runners/quic-yocto/downloads:/fileserver-downloads
3838
steps:
3939
- uses: actions/checkout@v4
@@ -64,19 +64,19 @@ jobs:
6464
scripts/build-linux-deb.sh kernel-configs/systemd-boot.config
6565
6666
- name: Upload results to fileserver
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6769
run: |
6870
set -ux
6971
# dcmd from devscripts will be used to parse .changes file
7072
apt -y install --no-install-recommends devscripts
71-
# curl will be used to talk to fileserver; should be installed by
72-
# default
73-
apt -y install curl
73+
# python3-requests is used by publish_aritfacts.py
74+
apt -y install python3-requests
7475
# copy to fileserver builds and downloads directories
75-
for dir in "/fileserver-builds/${BUILD_ID}" \
76-
"/fileserver-downloads/${BUILD_ID}"; do
77-
mkdir -vp "${dir}"
78-
cp -av `dcmd *.changes` "${dir}"
79-
done
76+
export BUILD_DIR="/fileserver-downloads/${BUILD_ID}"
77+
mkdir -vp "${BUILD_DIR}"
78+
cp -av `dcmd *.changes` "${BUILD_DIR}"
79+
8080
# create or update linux-deb-latest symlink
8181
mkdir -vp /fileserver-downloads/qcom-deb-images
8282
(
@@ -90,6 +90,7 @@ jobs:
9090
# perhaps help NFS sync
9191
sync
9292
# instruct fileserver to publish this directory
93-
url="${FILESERVER_URL}/${BUILD_ID}/"
94-
curl -X POST -H 'Accept: text/event-stream' "${url}"
93+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
94+
.github/workflows/publish_artifacts.py
95+
echo Image available at: ${URL}
9596

0 commit comments

Comments
 (0)