Skip to content

Commit e37e137

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 e37e137

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ 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:
1416

1517
jobs:
1618
uefi-only-boot-bin:
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
env:
10+
UEFI_ONLY_VERSION: uefi-only-${{ vars.UEFI_DATE }}-${{ vars.UEFI_LINUX_TAG }}
11+
12+
jobs:
13+
build:
14+
uses: ./.github/workflows/uefi-only-build.yaml
15+
16+
deploy:
17+
needs: build
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Download artifact
21+
uses: actions/download-artifact@v5
22+
with:
23+
name: uefi-only-boot.bin
24+
25+
- name: unzip artifact
26+
run: unzip uefi-only-boot.bin.zip
27+
28+
- name: Deploy to Bunny
29+
env:
30+
PKG_URL: https://storage.bunnycdn.com/asahilinux/os
31+
PKG_VER: ${{ env.UEFI_ONLY_VERSION }}.zip
32+
#ACCESS_KEY: ${{ secrets.BUNNY_TOKEN }}
33+
run: |
34+
if [ ! -e "${PKG_VER}" ]; then
35+
echo "Package not found!"
36+
ls -R
37+
exit 1
38+
fi
39+
40+
upload() {
41+
echo \
42+
curl -# --fail --request PUT \
43+
--url "${2}" \
44+
--variable %ACCESS_KEY \
45+
--expand-header 'AccessKey: {{ACCESS_KEY}}' \
46+
-H "Content-Type: ${3}" \
47+
-H "Accept: application/json" \
48+
--data-binary @${1}
49+
}
50+
51+
upload "${PKG_VER}" "${PKG_URL}/${PKG_VER}" "application/octet-stream"

0 commit comments

Comments
 (0)