8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 21:23:04 +01:00
firebird-mirror/.github/workflows/trim-trailing-spaces.yml
Adriano dos Santos Fernandes 4557daac92 Update actions/checkout to v3.
2022-08-30 08:48:03 -03:00

41 lines
1018 B
YAML

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@v3
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 }}