test #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linter | |
on: | |
push: | |
jobs: | |
linter: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check final newline | |
uses: johannesvedder/check-final-newline@dev | |
with: | |
fail_on_missing_newline: 'false' | |
- name: Echo files with missing newline | |
run: | | |
echo "Files with missing newline:" | |
git diff | |
git status --porcelain | |
- name: Check if working tree is dirty | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "Working tree is dirty" | |
else | |
echo "Working tree is clean" | |
fi | |
- name: Commit changes if any | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: 'lint: Apply final newline changes' | |
file_pattern: '. !**/l10n-missing.txt' | |
disable_globbing: true |