-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(update-renv): Add wf to update renv.lock
- Loading branch information
1 parent
9e70dec
commit dc71fdb
Showing
3 changed files
with
70 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
run: | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
lint: | ||
name: 🛠️ Store dependency versions | ||
if: ${{ inputs.run }} | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache: false | ||
extra-packages: any::renv | ||
|
||
- name: Update the renv.lock file | ||
run: renv::snapshot(prompt = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Commit and push changes | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
git switch ${{ inputs.branch_name }} | ||
git add man/\* NAMESPACE DESCRIPTION | ||
git commit -m "chore: update renv.lock" || echo "No changes to commit" | ||
git push |
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
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