Fix CI: drop incorrect -c flag, fix word splitting in tests
Tests / tests (push) Successful in 2m15s
Tests / tests (push) Successful in 2m15s
build-iso: - Remove -c flag (it takes a pacman.conf path, not a clean flag) - Use absolute paths for mkarchiso with -- separator - Copy local-aur.files* alongside local-aur.db* tests: - Fix word splitting: use 'while IFS= read -r' instead of 'for f in ' for shell and YAML file loops - Fix YAML find filter to use -not -path like shell find
This commit is contained in:
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Setup local AUR repo
|
||||
run: |
|
||||
mkdir -p /tmp/localrepo
|
||||
cp localrepo/*.pkg.tar.zst localrepo/local-aur.db* /tmp/localrepo/
|
||||
cp localrepo/*.pkg.tar.zst localrepo/local-aur.db* localrepo/local-aur.files* /tmp/localrepo/
|
||||
sed -i 's|file:///home/alvin/alvinarch/localrepo|file:///tmp/localrepo|' pacman.conf
|
||||
|
||||
- name: Install archiso and dependencies
|
||||
@@ -27,8 +27,8 @@ jobs:
|
||||
|
||||
- name: Build Arch ISO
|
||||
run: |
|
||||
rm -rf "${PWD}/work" || true
|
||||
mkarchiso -v -c -w "${PWD}/work" -o "${PWD}/out" -- "${PWD}"
|
||||
rm -rf "$PWD/work" || true
|
||||
mkarchiso -v -w "$PWD/work" -o "$PWD/out" -- "$PWD"
|
||||
|
||||
- name: Generate Unique Dynamic Tag
|
||||
id: tag
|
||||
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
fi
|
||||
|
||||
FAILED=0
|
||||
for f in $SH_FILES; do
|
||||
while IFS= read -r f; do
|
||||
echo ""
|
||||
echo "── Checking: $f"
|
||||
if shellcheck -x -s bash "$f"; then
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
echo " ❌ $f failed"
|
||||
FAILED=1
|
||||
fi
|
||||
done
|
||||
done <<< "$SH_FILES"
|
||||
|
||||
if [ "$FAILED" -ne 0 ]; then
|
||||
echo ""
|
||||
@@ -110,14 +110,14 @@ jobs:
|
||||
echo " Running yamllint on all YAML files"
|
||||
echo "═══════════════════════════════════════════════════════════════"
|
||||
|
||||
YAML_FILES=$(find . -name '*.yml' -o -name '*.yaml' | grep -v '.git/')
|
||||
YAML_FILES=$(find . -not -path './.git/*' \( -name '*.yml' -o -name '*.yaml' \))
|
||||
if [ -z "$YAML_FILES" ]; then
|
||||
echo "No YAML files found."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
FAILED=0
|
||||
for f in $YAML_FILES; do
|
||||
while IFS= read -r f; do
|
||||
echo ""
|
||||
echo "── Checking: $f"
|
||||
if yamllint -d "{extends: relaxed, rules: {document-start: disable, line-length: disable, new-line-at-end-of-file: disable}}" "$f"; then
|
||||
@@ -126,7 +126,7 @@ jobs:
|
||||
echo " ❌ $f failed"
|
||||
FAILED=1
|
||||
fi
|
||||
done
|
||||
done <<< "$YAML_FILES"
|
||||
|
||||
if [ "$FAILED" -ne 0 ]; then
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user