Skip to content

Commit f00e33c

Browse files
committed
turn off styler
1 parent 8d0621b commit f00e33c

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

.github/workflows/style-and-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
pull_request:
5-
branches: [main, master]
5+
branches: [not-main, not-master]
66

77
name: style-and-lint
88

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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 }}

0 commit comments

Comments
 (0)