Skip to content

Commit 6386823

Browse files
Merge pull request #111 from Githubguy132010/dev
Add GitHub Actions workflow for building Arch Linux ISO and configure VSCode settings
2 parents 4fd737f + 57fb24b commit 6386823

File tree

2 files changed

+120
-0
lines changed

2 files changed

+120
-0
lines changed

.github/workflows/build.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Build ISO
2+
3+
on:
4+
# Allows manual triggering
5+
workflow_dispatch:
6+
# Run daily at midnight UTC
7+
schedule:
8+
- cron: '0 0 * * *'
9+
10+
env:
11+
DOCKER_BUILDKIT: 1
12+
PACMAN_CACHE: /tmp/pacman-cache
13+
WORKSPACE: /workdir
14+
BUILD_DIR: /workdir/work
15+
OUTPUT_DIR: /workdir/out
16+
17+
jobs:
18+
build:
19+
name: Build Arch Linux ISO
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 180 # Extended timeout for the full build process
22+
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Environment
28+
run: |
29+
echo "Setting up build environment"
30+
mkdir -p out work
31+
echo "ISO_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
32+
echo "RELEASE_TAG=v$(date +'%Y.%m.%d')" >> $GITHUB_ENV
33+
34+
- name: Cache Pacman packages
35+
uses: actions/cache@v3
36+
with:
37+
path: ${{ env.PACMAN_CACHE }}
38+
key: archlinux-pacman-${{ github.run_id }}
39+
restore-keys: |
40+
archlinux-pacman-
41+
42+
- name: Set up Docker Container
43+
run: |
44+
mkdir -p ${{ env.PACMAN_CACHE }}
45+
docker build -t arch-iso-builder -f dockerfile .
46+
47+
- name: Build ISO
48+
run: |
49+
# Run the ISO build with privileged mode to allow loop device mounting
50+
docker run --rm --privileged \
51+
-v ${{ github.workspace }}:${{ env.WORKSPACE }} \
52+
-v ${{ env.PACMAN_CACHE }}:/var/cache/pacman/pkg \
53+
arch-iso-builder build out work
54+
55+
- name: Generate Checksums
56+
run: |
57+
cd out
58+
ISO_FILE=$(ls *.iso)
59+
echo "ISO_FILENAME=$ISO_FILE" >> $GITHUB_ENV
60+
61+
# Create checksums
62+
sha256sum "$ISO_FILE" > $ISO_FILE.sha256
63+
sha512sum "$ISO_FILE" > $ISO_FILE.sha512
64+
65+
# Rename ISO for better identification
66+
RENAMED_ISO="archlinux-nobeep-${{ env.ISO_DATE }}.iso"
67+
mv "$ISO_FILE" "$RENAMED_ISO"
68+
echo "RENAMED_ISO=$RENAMED_ISO" >> $GITHUB_ENV
69+
70+
- name: Generate Package Updates for Release Notes
71+
run: |
72+
docker run --rm \
73+
-v ${{ github.workspace }}:${{ env.WORKSPACE }} \
74+
arch-iso-builder bash -c "cd ${{ env.WORKSPACE }} && ./scripts/package_tracking/track_package_updates.sh"
75+
76+
# Prepare release notes
77+
echo "Generating release notes"
78+
{
79+
echo "# Arch Linux No Beep ISO - ${{ env.ISO_DATE }}"
80+
echo ""
81+
echo "## 📦 Automated Build"
82+
echo ""
83+
echo "This ISO was automatically built on $(date +'%Y-%m-%d %H:%M:%S %Z')"
84+
echo ""
85+
echo "### 🔧 Changes"
86+
echo ""
87+
echo "- Updated base packages to latest Arch Linux versions"
88+
echo "- All system beeps disabled by default"
89+
echo "- Performance optimizations for faster boot"
90+
echo ""
91+
if [ -f "/tmp/package-versions/package_updates.md" ]; then
92+
cat "/tmp/package-versions/package_updates.md"
93+
else
94+
echo "No detailed package information available for this build."
95+
fi
96+
} > release_notes.md
97+
98+
- name: Create GitHub Release
99+
uses: softprops/action-gh-release@v1
100+
with:
101+
files: |
102+
out/${{ env.RENAMED_ISO }}
103+
out/${{ env.RENAMED_ISO }}.sha256
104+
out/${{ env.RENAMED_ISO }}.sha512
105+
name: "Arch Linux No Beep - ${{ env.ISO_DATE }}"
106+
tag_name: ${{ env.RELEASE_TAG }}
107+
body_path: release_notes.md
108+
draft: false
109+
prerelease: false
110+
env:
111+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
112+
113+
- name: Clean Up
114+
if: always()
115+
run: |
116+
sudo rm -rf out/ work/
117+
docker image rm arch-iso-builder || true

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"chat.edits2.enabled": true
3+
}

0 commit comments

Comments
 (0)