Making the actions more ForegJo-like.
Some checks failed
vale / runner / vale (push) Failing after 9s
Some checks failed
vale / runner / vale (push) Failing after 9s
This commit is contained in:
parent
57a73968e8
commit
784684e61c
1 changed files with 1 additions and 1 deletions
53
.forgejo/workflows/vale.yml
Normal file
53
.forgejo/workflows/vale.yml
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
name: vale
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
vale:
|
||||
name: runner / vale
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
run: |
|
||||
git clone --depth 1 https://token:${{ secrets.ACTIONS_TOKEN }}@gugulet.hu/technical/git/g_it/site.git .
|
||||
cd site || true
|
||||
|
||||
- name: Check working directory structure
|
||||
run: |
|
||||
echo "## CURRENT DIRECTORY CONTENTS"
|
||||
pwd
|
||||
ls -la
|
||||
echo ""
|
||||
echo "## GIT REMOTE CONFIGURATION"
|
||||
git remote -v
|
||||
|
||||
- name: Install and run Vale
|
||||
run: |
|
||||
# Install Vale
|
||||
wget -qO- https://github.com/errata-ai/vale/releases/download/v3.14.1/vale_3.14.1_Linux_64-bit.tar.gz | tar xz -C /tmp
|
||||
export PATH="/tmp:$PATH"
|
||||
|
||||
if command -v vale &>/dev/null && [[ -f ".vale.ini" ]]; then
|
||||
echo "Running Vale on all Markdown files..."
|
||||
FAILED=0
|
||||
|
||||
while IFS= read -r file; do
|
||||
echo "Checking $file"
|
||||
if ! vale "$file"; then
|
||||
echo "Vale found issues in $file"
|
||||
FAILED=1
|
||||
else
|
||||
echo "Vale check passed for $file"
|
||||
fi
|
||||
done < <(find . -type f -name "*.md")
|
||||
|
||||
if [ $FAILED -eq 1 ]; then
|
||||
echo "Vale check failed. See output above."
|
||||
exit 1
|
||||
fi
|
||||
echo "Vale check completed successfully."
|
||||
else
|
||||
echo "Vale not installed or .vale.ini missing. Skipping Vale."
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue