Skip to content

Commit 4f46b97

Browse files
committed
WIP: CI test only without deplay
CI: add manual uefi-only boot.bin deploy workflow This workflow deploys versioned uefi-only OS zip images for installer use. Since it depends on repository variables it will only run manually via workflow_dispatch. Signed-off-by: Janne Grunau <[email protected]>
1 parent 4d2ac76 commit 4f46b97

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/uefi-only-build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ on:
1111

1212
# Allows you to run this workflow manually from the Actions tab
1313
workflow_dispatch:
14+
# Allow being called from other workflows to deploy the artifact.
15+
workflow_call:
16+
outputs:
17+
uefi-only-version:
18+
description: Nme and version of the built uefi-only boot.bin
19+
value: ${{ jobs.uefi-only-boot-bin.outputs.UEFI_ONLY_VERSION }}
1420

1521
jobs:
1622
uefi-only-boot-bin:
@@ -81,6 +87,7 @@ jobs:
8187
> out/esp/m1n1/boot.bin
8288
cd out
8389
zip -r ${{ env.UEFI_ONLY_VERSION }}.zip esp
90+
echo "UEFI_ONLY_VERSION=${{ env.UEFI_ONLY_VERSION }}" >> $GITHUB_OUTPUT
8491
8592
- uses: actions/upload-artifact@v4
8693
with:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: uefi-only-deploy
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths: [ .github/workflows/uefi-only-deploy.yaml ]
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
uses: ./.github/workflows/uefi-only-build.yaml
12+
13+
deploy:
14+
needs: build
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Download artefact
18+
uses: actions/download-artifact@v5
19+
with:
20+
name: uefi-only-boot.bin
21+
22+
- name: Deploy to Bunny
23+
env:
24+
PKG_URL: https://storage.bunnycdn.com/asahilinux/os
25+
PKG_VER: ${{ needs.build.outputs.uefi-only-version }}.zip
26+
#ACCESS_KEY: ${{ secrets.BUNNY_TOKEN }}
27+
run: |
28+
if [ ! -e "${PKG_VER}" ]; then
29+
echo "Package not found!"
30+
exit 1
31+
fi
32+
33+
upload() {
34+
echo \
35+
curl -# --fail --request PUT \
36+
--url "${2}" \
37+
--variable %ACCESS_KEY \
38+
--expand-header 'AccessKey: {{ACCESS_KEY}}' \
39+
-H "Content-Type: ${3}" \
40+
-H "Accept: application/json" \
41+
--data-binary @${1}
42+
}
43+
44+
upload "${PKG_VER}" "${PKG_URL}/${PKG_VER}" "application/octet-stream"

0 commit comments

Comments
 (0)