-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (88 loc) · 3.18 KB
/
release.yml
File metadata and controls
104 lines (88 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Cut Release
permissions:
contents: write
issues: write
on:
push:
branches:
- main
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v4
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Display the environment variables and their values
run: |
curl -L -o /tmp/auto.gz https://github.com/intuit/auto/releases/download/v11.1.6/auto-linux.gz
gzip -d /tmp/auto.gz
chmod +x /tmp/auto
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl make isolinux mtools
- name: Clone iPXE repository
run: git clone https://github.com/ipxe/ipxe.git
- name: iPXE Prepare certificates
run: |
cd ipxe/src
curl -s http://ca.ipxe.org/ca.crt > ca.pem
curl -s https://letsencrypt.org/certs/isrgrootx1.pem > isrgrootx1.pem
curl -s https://letsencrypt.org/certs/lets-encrypt-r3.pem > lets-encrypt-r3.pem
- name: iPXE Prepare embedded script
run: |
echo See https://ipxe.org/embed
cd ipxe/src
cat << EOF > script.ipxe
#!ipxe
prompt --key 0x02 --timeout 4000 Press Ctrl-B for the iPXE command line... && shell ||
ifstat
ifopen
set net3/ip:ipv4 77.95.37.34
set net3/netmask:ipv4 255.255.255.240
set net3/gateway:ipv4 77.95.37.33
set net3/dns:ipv4 8.8.8.8
ifopen net3
sleep 4
ifstat
:retry_ping
ping -c 1 8.8.8.8 || goto retry_ping
ifstat
chain https://boot.karmacomputing.co.uk/boot.txt?uuid=${uuid}
EOF
- name: iPXE Build iPXE ISO
# Why do I see "file:autoexec.ipxe not found" when
# this ipxe.iso boots?
# Answer: It's not an error, it's information and not requried.
# See https://github.com/ipxe/ipxe/issues/643#issuecomment-2486543385
#
run: |
cd ipxe/src
pwd
ls -l
cat script.ipxe
echo Enable ping command
echo See https://ipxe.org/buildcfg
sed -i 's$//#define PING_CMD$#define PING_CMD$g' config/general.h
sed -i 's$//#define NET_PROTO_IPV6$#define NET_PROTO_IPV6$g' config/general.h
echo Enable https download
sed -i 's/undef.*DOWNLOAD_PROTO_HTTPS/define DOWNLOAD_PROTO_HTTPS/g' config/general.h
echo Build iPXE ISO
make bin-x86_64-efi/ipxe.iso \
DEBUG=tls,httpcore,x509,certstore \
CERT=ca.pem,isrgrootx1.pem,lets-encrypt-r3.pem \
TRUST=ca.pem,isrgrootx1.pem,lets-encrypt-r3.pem \
EMBED=script.ipxe
- name: iPXE Publish iPXE ISO artifact
uses: actions/upload-artifact@v4
with:
name: ipxe-iso
path: ipxe/src/bin-x86_64-efi/ipxe.iso
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx /tmp/auto shipit