mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
Add workflow to trim trailing spaces from source files.
This commit is contained in:
parent
b1628581cc
commit
7126201b60
40
.github/workflows/trim-trailing-spaces.yml
vendored
Normal file
40
.github/workflows/trim-trailing-spaces.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: trim-trailing-spaces
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 10 * * *'
|
||||
|
||||
jobs:
|
||||
trim-trailing-spaces:
|
||||
if: github.repository == 'FirebirdSQL/firebird'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branch:
|
||||
- master
|
||||
- v4.0-release
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ matrix.branch }}
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Trim trailing spaces
|
||||
run: |
|
||||
find src/ -type f \( -iname \*.h -o -iname \*.cpp -o -iname \*.c -o -iname \*.epp -o -iname \*.y \) | xargs sed -i 's/[ \t]*$//'
|
||||
|
||||
- name: Commit files
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git commit -a -m Misc. || exit 0
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: ${{ matrix.branch }}
|
Loading…
Reference in New Issue
Block a user