-
Notifications
You must be signed in to change notification settings - Fork 5
33 lines (28 loc) · 1.02 KB
/
dos2unix.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
paths: ["R/**", "tests/**"]
name: dos2unix
jobs:
line-break-fix:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up dos2unix
run: sudo apt-get install dos2unix
- name: Run dos2unix
run: |
find ./R -type f -name "*.R" -exec dos2unix {} \;
find ./tests/testthat -type f -name "*.R" -exec dos2unix {} \;
- name: Commit and push changes
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add ./R/*.R
git add ./tests/testthat/*.R
git commit -m "Conversion of R files from CRLF to LF" || echo "No changes to commit"
git pull --ff-only
git push origin