-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2bbb83
commit 7a379b7
Showing
1 changed file
with
34 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,13 +43,29 @@ jobs: | |
run: roxygen2::roxygenise() | ||
shell: Rscript {0} | ||
|
||
- name: commit | ||
- name: Config git | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
# Check if there are any changes | ||
- name: Check for changes | ||
id: check_changes | ||
run: | | ||
git diff --exit-code --quiet --name-only -- NAMESPACE man/ || echo "Changes detected" | ||
- name: Commit the changes | ||
if: steps.check_changes.outputs.stdout == 'Changes detected' | ||
run: | | ||
git add man/\* NAMESPACE | ||
git commit -m '[GHA] Document package' | ||
# Commit changes or a placeholder commit if no changes | ||
- name: Commit no changes | ||
if: steps.check_changes.outputs.stdout != 'Changes detected' | ||
run: | | ||
git commit --allow-empty -m '[GHA] Package already documented' | ||
- uses: r-lib/actions/pr-push@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -79,7 +95,6 @@ jobs: | |
- name: Set up for RProtoBuf | ||
run: sudo apt-get update -y && sudo apt-get install protobuf-compiler libprotobuf-dev libprotoc-dev | ||
|
||
|
||
- name: Install dependencies | ||
run: install.packages("styler") | ||
shell: Rscript {0} | ||
|
@@ -88,13 +103,29 @@ jobs: | |
run: styler::style_pkg(transformers = styler::tidyverse_style(indent_by = 4)) | ||
shell: Rscript {0} | ||
|
||
- name: commit | ||
- name: Config git | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
# Check if there are any changes | ||
- name: Check for changes | ||
id: check_changes | ||
run: | | ||
git diff --quiet \*.R || echo "Changes detected" | ||
- name: Commit the changes | ||
if: steps.check_changes.outputs.stdout == 'Changes detected' | ||
run: | | ||
git add \*.R | ||
git commit -m '[GHA] Style package' | ||
# Commit changes or a placeholder commit if no changes | ||
- name: Commit no changes | ||
if: steps.check_changes.outputs.stdout != 'Changes detected' | ||
run: | | ||
git commit --allow-empty -m '[GHA] Package already styled' | ||
- uses: r-lib/actions/pr-push@v2 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |