File tree Expand file tree Collapse file tree 2 files changed +54
-1
lines changed Expand file tree Collapse file tree 2 files changed +54
-1
lines changed Original file line number Diff line number Diff line change 22# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33on :
44 pull_request :
5- branches : [main, master]
5+ branches : [not- main, not- master]
66
77name : style-and-lint
88
Original file line number Diff line number Diff line change 1+ # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+ on :
4+ pull_request :
5+ branches : [main, master]
6+
7+ name : style-with-air
8+
9+ permissions : write-all
10+
11+ jobs :
12+ style_pkg :
13+ runs-on : ubuntu-latest
14+ env :
15+ GH_TOKEN : ${{ github.token }}
16+ GITHUB_PAT : ${{ secrets.GITHUB_TOKEN }}
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - uses : r-lib/actions/pr-fetch@v2
22+ with :
23+ repo-token : ${{ secrets.GITHUB_TOKEN }}
24+
25+ - name : Install Nix
26+ uses : DeterminateSystems/nix-installer-action@main
27+
28+ - uses : cachix/cachix-action@v15
29+ with :
30+ name : rstats-on-nix
31+
32+ - name : Build dev env
33+ run : nix-build
34+
35+ - name : Run Air
36+ run : nix-shell -I nixpkgs='https://github.com/rstats-on-nix/nixpkgs/archive/2025-02-28.tar.gz' -p air-formatter --run "air format ."
37+
38+ - name : config bot user and check for changes
39+ run : |
40+ git config --local user.name "$GITHUB_ACTOR"
41+ git config --local user.email "[email protected] " 42+ git diff-index --quiet HEAD || echo "has_changes=true" >> $GITHUB_ENV
43+
44+ - name : commit if changes
45+ if : env.has_changes == 'true'
46+ run : |
47+ git add \*.R
48+ git add \*.Rmd
49+ git commit -m 'Style via {styler}'
50+
51+ - uses : r-lib/actions/pr-push@v2
52+ with :
53+ repo-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments