Merge pull request #31 from alephnull7/master #13
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
# 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 |