Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experiment with autobump deps PR workflow #624

Merged
merged 14 commits into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/update-to-latest-easystats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: update-to-latest-easystats

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

# Run on a schedule (once a month)
# schedule:
# - cron: "0 0 1 * *"

jobs:
update-to-latest-easystats:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up R
uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
extra-packages: |
any::usethis

- name: Update DESCRIPTION file
id: update_description
run: |
usethis::use_latest_dependencies()
shell: Rscript {0}

- name: Check for changes in DESCRIPTION
id: check_description
run: |
git status
git add --all

- name: Create pull request
#if: ${{ steps.update_description.outputs.changed }}
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: main
branch: desc-${{ github.ref_name }}-${{ github.job }}
branch-suffix: timestamp
delete-branch: true
title: "Update `DESCRIPTION` to use latest 'easystats' dependencies"
body: "Automatically updated the `DESCRIPTION` file using `usethis::use_latest_dependencies()`."
labels: "auto-update"
add-paths: |
DESCRIPTION
Loading