Skip to content

Commit e0a8baa

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

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/linux.yml

Lines changed: 12 additions & 10 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
@@ -64,19 +65,19 @@ jobs:
6465
scripts/build-linux-deb.sh kernel-configs/systemd-boot.config
6566
6667
- name: Upload results to fileserver
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6770
run: |
6871
set -ux
6972
# dcmd from devscripts will be used to parse .changes file
7073
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
74+
# python3-requests is used by publish_aritfacts.py
75+
apt -y install python3-requests
7476
# 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
77+
export BUILD_DIR="/fileserver-downloads/${BUILD_ID}"
78+
mkdir -vp "${BUILD_DIR}"
79+
cp -av `dcmd *.changes` "${BUILD_DIR}"
80+
8081
# create or update linux-deb-latest symlink
8182
mkdir -vp /fileserver-downloads/qcom-deb-images
8283
(
@@ -90,6 +91,7 @@ jobs:
9091
# perhaps help NFS sync
9192
sync
9293
# instruct fileserver to publish this directory
93-
url="${FILESERVER_URL}/${BUILD_ID}/"
94-
curl -X POST -H 'Accept: text/event-stream' "${url}"
94+
export URL="${FILESERVER_URL}/${BUILD_ID}/"
95+
.github/workflows/publish_artifacts.py
96+
echo Image available at: ${URL}
9597

0 commit comments

Comments
 (0)