Skip to content

Commit 8d992e2

Browse files
Create build.yml
1 parent 9f83de5 commit 8d992e2

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/blank.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build ISO
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest # Use a standard runner
13+
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Arch Linux Container
19+
run: |
20+
docker run --privileged --name arch-container -d -v ${{ github.workspace }}:/workdir archlinux:latest sleep infinity
21+
22+
- name: Build ISO in Arch Container
23+
run: |
24+
docker exec arch-container bash -c "
25+
pacman -Syu --noconfirm &&
26+
pacman -S --noconfirm git archiso grub &&
27+
cd /workdir &&
28+
cd /ArchGUI &&
29+
mkarchiso -v -w workdir/ -o out/ /workdir
30+
"
31+
32+
- name: Rename the Created ISO to BlendOS.iso
33+
run: |
34+
docker exec arch-container bash -c "
35+
# Find the created ISO (assuming only one .iso file in the output directory)
36+
iso_file=\$(ls /workdir/out/*.iso | head -n 1) &&
37+
38+
mv \$iso_file /workdir/out/Arch.iso
39+
"
40+
41+
- name: List ISO files
42+
run: |
43+
# List files in the output directory to verify renaming
44+
docker exec arch-container bash -c "ls -l /workdir/out/"
45+
46+
- name: Copy ISO to Host
47+
run: |
48+
# Copy the renamed ISO to the host
49+
docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/
50+
51+
- name: Upload Build Artifact
52+
uses: actions/[email protected]
53+
with:
54+
name: Arch Linux
55+
path: "Arch.iso"
56+
retention-days: 90
57+
include-hidden-files: false
58+
59+
- name: Clean Up
60+
run: |
61+
docker stop arch-container
62+
docker rm arch-container

0 commit comments

Comments
 (0)