Skip to content

Commit 7e93ebf

Browse files
Merge pull request #63 from Githubguy132010/fix-build-check
Fix build-check.yaml issues
2 parents 0758a32 + f58cf72 commit 7e93ebf

File tree

2 files changed

+11
-71
lines changed

2 files changed

+11
-71
lines changed

.github/workflows/build-check.yaml

Lines changed: 11 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,65 +17,7 @@ env:
1717
OUTPUT_DIR: /workdir/out
1818

1919
jobs:
20-
validate:
21-
runs-on: ubuntu-latest
22-
steps:
23-
- name: Checkout Repository
24-
uses: actions/checkout@v4
25-
26-
- name: Validate package list
27-
run: |
28-
# Check if package list exists
29-
if [ ! -f packages.x86_64 ]; then
30-
echo "::error::packages.x86_64 file not found"
31-
exit 1
32-
fi
33-
34-
# Check for duplicate packages
35-
sort packages.x86_64 | uniq -d > duplicates.txt
36-
if [ -s duplicates.txt ]; then
37-
echo "::error::Duplicate packages found:"
38-
cat duplicates.txt
39-
exit 1
40-
fi
41-
42-
# Validate package names exist in Arch repos
43-
docker run --rm -v "${{ github.workspace }}/packages.x86_64:/packages.x86_64:ro" archlinux:latest bash -c "
44-
set -euo pipefail
45-
pacman -Syu --noconfirm
46-
while read -r pkg; do
47-
[[ \$pkg =~ ^# ]] && continue
48-
[[ -z \$pkg ]] && continue
49-
if ! pacman -Si \$pkg >/dev/null 2>&1; then
50-
echo \"::error::Package not found: \$pkg\"
51-
exit 1
52-
fi
53-
done < /packages.x86_64
54-
"
55-
56-
security-scan:
57-
runs-on: ubuntu-latest
58-
steps:
59-
- name: Checkout Repository
60-
uses: actions/checkout@v4
61-
62-
- name: Run Security Scan
63-
uses: aquasecurity/trivy-action@master
64-
with:
65-
scan-type: 'fs'
66-
ignore-unfixed: true
67-
format: 'sarif'
68-
output: 'trivy-results.sarif'
69-
severity: 'CRITICAL,HIGH'
70-
71-
- name: Upload Scan Results
72-
uses: github/codeql-action/upload-sarif@v3
73-
if: always()
74-
with:
75-
sarif_file: 'trivy-results.sarif'
76-
7720
test-build:
78-
needs: [validate, security-scan]
7921
runs-on: ubuntu-latest
8022
timeout-minutes: 120
8123

@@ -104,7 +46,7 @@ jobs:
10446
docker exec arch-container bash -c "
10547
set -euo pipefail
10648
pacman -Syu --noconfirm
107-
pacman -S --noconfirm --needed git archiso grub
49+
pacman -S --noconfirm --needed git archiso grub qemu
10850
"
10951
11052
- name: Test Build
@@ -149,6 +91,16 @@ jobs:
14991
echo '::error::ISO checksum verification failed'
15092
exit 1
15193
}
94+
95+
# Verify ISO bootability
96+
qemu-system-x86_64 -cdrom \"\$iso_file\" -boot d -m 512 -nographic -net none -no-reboot -serial mon:stdio -display none -kernel /boot/vmlinuz-linux -initrd /boot/initramfs-linux.img -append \"console=ttyS0\" || {
97+
echo '::error::ISO bootability test failed'
98+
exit 1
99+
}
100+
101+
# Generate additional checksums
102+
md5sum \"\$iso_file\" > checksum.md5
103+
sha1sum \"\$iso_file\" > checksum.sha1
152104
"
153105
154106
- name: Clean Up

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
32
# Arch Linux Without the Beeps
43

54
This repository provides a customized Arch Linux ISO with the system beeps disabled, ideal for users who prefer a quieter environment.
@@ -50,7 +49,6 @@ Make sure you have Docker installed on your system.
5049

5150
Once the process completes, the ISO will be available in the `out/` directory within your local folder as `Arch.iso`.
5251

53-
5452
## How to Use GitHub Actions (Automated Workflow)
5553

5654
This repository also includes a GitHub Actions workflow for building and releasing the ISO automatically on GitHub.
@@ -81,16 +79,6 @@ The GitHub Actions workflow automatically builds and releases the ISO. Here’s
8179

8280
### Detailed Explanations of Each Workflow
8381

84-
#### Validate and Test Build
85-
86-
- **File**: `build-check.yaml`
87-
- **Purpose**: Validates the package list, runs a security scan, and tests the build process.
88-
- **Steps**:
89-
1. **Checkout Repository**: Pulls the latest files from the repository.
90-
2. **Validate Package List**: Checks for duplicate packages and validates package names.
91-
3. **Run Security Scan**: Uses Trivy to scan for vulnerabilities.
92-
4. **Test Build**: Builds the ISO and verifies its integrity.
93-
9482
#### Build ISO
9583

9684
- **File**: `build.yaml`

0 commit comments

Comments
 (0)