@@ -41,21 +41,37 @@ jobs:
4141
4242 - name : Set up Docker Container
4343 run : |
44+ # Ensure package cache directory exists
4445 mkdir -p ${{ env.PACMAN_CACHE }}
45- docker build -t arch-iso-builder -f dockerfile .
46+ # Build the Docker image with proper error handling
47+ docker build -t arch-iso-builder -f dockerfile . || {
48+ echo "::error::Failed to build Docker image"
49+ exit 1
50+ }
4651
4752 - name : Build ISO
4853 run : |
4954 # Run the ISO build with privileged mode to allow loop device mounting
55+ # The 'build' command is passed to the entrypoint script
5056 docker run --rm --privileged \
5157 -v ${{ github.workspace }}:${{ env.WORKSPACE }} \
5258 -v ${{ env.PACMAN_CACHE }}:/var/cache/pacman/pkg \
53- arch-iso-builder build out work
59+ arch-iso-builder build out work || {
60+ echo "::error::ISO build failed"
61+ exit 1
62+ }
5463
5564 - name : Generate Checksums
5665 run : |
5766 cd out
58- ISO_FILE=$(ls *.iso)
67+ # Check if ISO file exists
68+ if ! ls *.iso &>/dev/null; then
69+ echo "::error::No ISO file found in output directory"
70+ exit 1
71+ fi
72+
73+ # Get the ISO filename
74+ ISO_FILE=$(ls *.iso | head -n1)
5975 echo "ISO_FILENAME=$ISO_FILE" >> $GITHUB_ENV
6076
6177 # Create checksums
6985
7086 - name : Generate Package Updates for Release Notes
7187 run : |
88+ # Create directory for package tracking output
89+ mkdir -p /tmp/package-versions
90+
91+ # Run package tracking script with proper error handling
92+ echo "Running package tracking script..."
7293 docker run --rm \
7394 -v ${{ github.workspace }}:${{ env.WORKSPACE }} \
74- arch-iso-builder bash -c "cd ${{ env.WORKSPACE }} && ./scripts/package_tracking/track_package_updates.sh"
95+ -v /tmp/package-versions:/tmp/package-versions \
96+ arch-iso-builder shell "cd ${{ env.WORKSPACE }} && ./scripts/package_tracking/track_package_updates.sh" || {
97+ echo "::warning::Package tracking failed, continuing with simplified release notes"
98+ # Ensure the directory exists even if command failed
99+ mkdir -p /tmp/package-versions
100+ }
75101
76102 # Prepare release notes
77103 echo "Generating release notes"
@@ -89,11 +115,21 @@ jobs:
89115 echo "- Performance optimizations for faster boot"
90116 echo ""
91117 if [ -f "/tmp/package-versions/package_updates.md" ]; then
118+ echo "### 📊 Package Updates"
119+ echo ""
92120 cat "/tmp/package-versions/package_updates.md"
93121 else
94122 echo "No detailed package information available for this build."
95123 fi
96124 } > release_notes.md
125+
126+ # Verify release notes were created
127+ if [ ! -s release_notes.md ]; then
128+ echo "::warning::Release notes file is empty, creating fallback content"
129+ echo "# Arch Linux No Beep ISO - ${{ env.ISO_DATE }}" > release_notes.md
130+ echo "" >> release_notes.md
131+ echo "This ISO was automatically built on $(date +'%Y-%m-%d %H:%M:%S %Z')" >> release_notes.md
132+ fi
97133
98134 - name : Create GitHub Release
99135 uses : softprops/action-gh-release@v1
0 commit comments