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
|
- name: Setup local AUR repo
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /tmp/localrepo
|
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
|
sed -i 's|file:///home/alvin/alvinarch/localrepo|file:///tmp/localrepo|' pacman.conf
|
||||||
|
|
||||||
- name: Install archiso and dependencies
|
- name: Install archiso and dependencies
|
||||||
@@ -27,8 +27,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Build Arch ISO
|
- name: Build Arch ISO
|
||||||
run: |
|
run: |
|
||||||
rm -rf "${PWD}/work" || true
|
rm -rf "$PWD/work" || true
|
||||||
mkarchiso -v -c -w "${PWD}/work" -o "${PWD}/out" -- "${PWD}"
|
mkarchiso -v -w "$PWD/work" -o "$PWD/out" -- "$PWD"
|
||||||
|
|
||||||
- name: Generate Unique Dynamic Tag
|
- name: Generate Unique Dynamic Tag
|
||||||
id: tag
|
id: tag
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
FAILED=0
|
FAILED=0
|
||||||
for f in $SH_FILES; do
|
while IFS= read -r f; do
|
||||||
echo ""
|
echo ""
|
||||||
echo "── Checking: $f"
|
echo "── Checking: $f"
|
||||||
if shellcheck -x -s bash "$f"; then
|
if shellcheck -x -s bash "$f"; then
|
||||||
@@ -89,7 +89,7 @@ jobs:
|
|||||||
echo " ❌ $f failed"
|
echo " ❌ $f failed"
|
||||||
FAILED=1
|
FAILED=1
|
||||||
fi
|
fi
|
||||||
done
|
done <<< "$SH_FILES"
|
||||||
|
|
||||||
if [ "$FAILED" -ne 0 ]; then
|
if [ "$FAILED" -ne 0 ]; then
|
||||||
echo ""
|
echo ""
|
||||||
@@ -110,14 +110,14 @@ jobs:
|
|||||||
echo " Running yamllint on all YAML files"
|
echo " Running yamllint on all YAML files"
|
||||||
echo "═══════════════════════════════════════════════════════════════"
|
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
|
if [ -z "$YAML_FILES" ]; then
|
||||||
echo "No YAML files found."
|
echo "No YAML files found."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FAILED=0
|
FAILED=0
|
||||||
for f in $YAML_FILES; do
|
while IFS= read -r f; do
|
||||||
echo ""
|
echo ""
|
||||||
echo "── Checking: $f"
|
echo "── Checking: $f"
|
||||||
if yamllint -d "{extends: relaxed, rules: {document-start: disable, line-length: disable, new-line-at-end-of-file: disable}}" "$f"; then
|
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"
|
echo " ❌ $f failed"
|
||||||
FAILED=1
|
FAILED=1
|
||||||
fi
|
fi
|
||||||
done
|
done <<< "$YAML_FILES"
|
||||||
|
|
||||||
if [ "$FAILED" -ne 0 ]; then
|
if [ "$FAILED" -ne 0 ]; then
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user