woodburn/.gitea/workflows/push.yml

28 lines
650 B
YAML
Raw Normal View History

2023-07-17 16:40:30 +10:00
name: OnPush
run-name: ${{ gitea.actor }} has pushed to woodburn repo
on: [push]
jobs:
2023-07-17 16:44:22 +10:00
CheckFiles:
2023-07-17 16:40:30 +10:00
runs-on: ubuntu-latest
steps:
- name: Commiter
run: |
echo "Commited by: ${{ gitea.actor }}!"
2023-07-17 16:44:22 +10:00
- name: Checkout
uses: actions/checkout@v2
2023-07-17 16:40:30 +10:00
- name: List HTML files
run: |
2023-07-17 16:44:22 +10:00
ls *.html
2023-07-17 16:50:39 +10:00
- name: Check files
2023-07-17 16:48:37 +10:00
run: |
for file in *.html; do
2023-07-17 16:51:32 +10:00
if grep -q "$file" "$file"; then
2023-07-17 16:54:28 +10:00
echo "File $file contains canonical tag with .html!"
2023-07-17 16:48:37 +10:00
exit 1
2023-07-17 16:50:39 +10:00
else
2023-07-17 16:54:28 +10:00
echo "File $file is correct!"
2023-07-17 16:48:37 +10:00
fi
done