Skip to content

Commit fd946a5

Browse files
Merge pull request #49 from Githubguy132010/WFRework
chore: remove outdated workflows and validation steps from GitHub Actions.
2 parents 2c3c85b + e82e3bc commit fd946a5

File tree

4 files changed

+49
-365
lines changed

4 files changed

+49
-365
lines changed

.github/workflows/build-check.yaml

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,6 @@ jobs:
2323
- name: Checkout Repository
2424
uses: actions/checkout@v4
2525

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-
5626
security-scan:
5727
runs-on: ubuntu-latest
5828
steps:
@@ -83,14 +53,6 @@ jobs:
8353
- name: Checkout Repository
8454
uses: actions/checkout@v4
8555

86-
- name: Cache Pacman packages
87-
uses: actions/cache@v4
88-
with:
89-
path: ${{ env.PACMAN_CACHE }}
90-
key: pacman-${{ runner.os }}-${{ github.sha }}
91-
restore-keys: |
92-
pacman-${{ runner.os }}-
93-
9456
- name: Set up Arch Linux Container
9557
run: |
9658
mkdir -p ${{ env.PACMAN_CACHE }}

.github/workflows/build.yaml

Lines changed: 49 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,8 @@ jobs:
3030
run: |
3131
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
3232
echo "VERSION=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
33-
echo "CACHE_KEY=$(date +'%Y-%m')" >> $GITHUB_ENV
3433
echo "WORKSPACE=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
3534
36-
- name: Create Cache Directories
37-
run: |
38-
sudo mkdir -p /tmp/pacman-cache
39-
sudo chmod 777 /tmp/pacman-cache
40-
# Ensure the directory is empty to prevent tar errors
41-
sudo rm -rf /tmp/pacman-cache/*
42-
43-
- name: Cache Pacman packages
44-
uses: actions/cache@v4
45-
with:
46-
path: /tmp/pacman-cache
47-
key: pacman-${{ runner.os }}-${{ env.CACHE_KEY }}
48-
restore-keys: |
49-
pacman-${{ runner.os }}-
50-
5135
- name: Set up Arch Linux Container
5236
run: |
5337
docker run --privileged --name arch-container -d \
@@ -133,86 +117,81 @@ jobs:
133117
done
134118
"
135119
120+
- name: Clean Up
121+
if: always()
122+
run: |
123+
if docker ps -a | grep -q arch-container; then
124+
docker stop arch-container || true
125+
docker rm -f arch-container || true
126+
fi
127+
sudo rm -rf workdir/ out/ /tmp/pacman-cache/*
128+
129+
create-release:
130+
needs: build
131+
if: github.ref == 'refs/heads/main'
132+
runs-on: ubuntu-latest
133+
steps:
134+
- name: Checkout Repository
135+
uses: actions/checkout@v4
136+
with:
137+
fetch-depth: 0 # Nodig voor git history
138+
136139
- name: Generate Release Notes
137140
id: release_notes
138141
run: |
139142
# Create a temporary file for release notes
140143
TEMP_RELEASE_NOTES=$(mktemp)
141144
142-
docker exec arch-container bash -c "
143-
set -euo pipefail
144-
cd /workdir
145+
{
146+
echo "🚀 Arch Linux ISO without system beeps (build ${{ env.DATE }})"
147+
echo ""
148+
echo "### Changes"
145149
146-
# Initialize release notes
147-
{
148-
echo '🚀 Arch Linux ISO without system beeps (build ${{ env.DATE }})'
149-
echo ''
150-
echo '### Changes'
151-
152-
# Get changes since last release
153-
if git tag | grep -q .; then
154-
LAST_TAG=\$(git describe --tags --abbrev=0 2>/dev/null || echo '')
155-
if [ ! -z \"\$LAST_TAG\" ]; then
156-
echo '#### Commits since last release:'
157-
git log \"\$LAST_TAG\"..HEAD --pretty=format:'- %s' | grep -v 'Merge'
158-
echo ''
159-
fi
150+
# Get changes since last release
151+
if git tag | grep -q .; then
152+
LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo '')
153+
if [ ! -z "$LAST_TAG" ]; then
154+
echo "#### Commits since last release:"
155+
git log "$LAST_TAG"..HEAD --pretty=format:'- %s' | grep -v 'Merge'
156+
echo ""
160157
fi
161-
162-
# Add standard information
163-
echo '### Features'
164-
echo '- Automatic daily build'
165-
echo '- System beeps disabled'
166-
echo '- ISO SHA256 and SHA512 checksums included'
167-
echo ''
168-
echo '### Download'
169-
echo '- Download the ISO and verify checksums before use'
170-
echo ''
171-
echo '### Checksums'
172-
echo 'SHA256 and SHA512 checksums are available in the uploaded files.'
173-
} > /tmp/release_notes
174-
"
175-
176-
# Copy release notes from container to host
177-
docker cp arch-container:/tmp/release_notes $TEMP_RELEASE_NOTES
158+
fi
159+
160+
echo "### Download"
161+
echo "- Download the ISO and verify checksums before use"
162+
echo ""
163+
echo "### Checksums"
164+
echo "SHA256 and SHA512 checksums are available in the uploaded files."
165+
} > $TEMP_RELEASE_NOTES
178166
179-
# Set the release notes in GITHUB_ENV
180-
echo 'RELEASE_NOTES<<EOF' >> $GITHUB_ENV
167+
echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
181168
cat $TEMP_RELEASE_NOTES >> $GITHUB_ENV
182-
echo 'EOF' >> $GITHUB_ENV
169+
echo "EOF" >> $GITHUB_ENV
183170
184-
# Cleanup
185171
rm -f $TEMP_RELEASE_NOTES
186172
187173
- name: Create Release
188-
id: create_release
189174
uses: softprops/action-gh-release@v2
190-
if: github.ref == 'refs/heads/main'
191175
with:
192176
tag_name: v${{ env.VERSION }}
193-
name: "Arch Linux No Beeps v${{ env.VERSION }}"
177+
name: "Arch Linux without the beeps v${{ env.VERSION }}"
194178
body: ${{ env.RELEASE_NOTES }}
195179
draft: false
196180
prerelease: false
197181
files: |
198182
${{ env.WORKSPACE }}/out/*.iso
199183
${{ env.WORKSPACE }}/out/*.sha*sum
200184
201-
- name: Clean Up
202-
if: always()
203-
run: |
204-
if docker ps -a | grep -q arch-container; then
205-
docker stop arch-container || true
206-
docker rm -f arch-container || true
207-
fi
208-
sudo rm -rf workdir/ out/ /tmp/pacman-cache/*
209-
210-
- name: Upload Build Logs on Failure
211-
if: failure()
212-
uses: actions/upload-artifact@v4 # Upgrade to v4
185+
upload-logs:
186+
needs: build
187+
if: failure()
188+
runs-on: ubuntu-latest
189+
steps:
190+
- name: Upload Build Logs
191+
uses: actions/upload-artifact@v4
213192
with:
214193
name: build-logs
215194
path: |
216195
${{ env.WORKSPACE }}/build.log
217196
retention-days: 5
218-
compression-level: 9 # Maximum compression for logs
197+
compression-level: 9

.github/workflows/update-docs.yaml

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)