-
Notifications
You must be signed in to change notification settings - Fork 251
Add bundle update schedule #2602
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,59 @@ | ||||||
| name: Scheduled Bundle Update PR | ||||||
|
|
||||||
| on: | ||||||
| schedule: | ||||||
| - cron: '0 0 * * 2' | ||||||
| workflow_dispatch: | ||||||
|
|
||||||
| jobs: | ||||||
| bundle-update: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Set up Ruby | ||||||
| uses: ruby/setup-ruby@v1 | ||||||
| with: | ||||||
| ruby-version: '3.4' | ||||||
|
||||||
|
|
||||||
| - name: Set up git | ||||||
| run: | | ||||||
| git config --global user.name "github-actions[bot]" | ||||||
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||||||
|
Comment on lines
+21
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’d suggest setting up Git after “Run bundle update”, but it would mean more |
||||||
|
|
||||||
| - name: Switch branch | ||||||
| run: | | ||||||
| git switch -c bundle-update-$(date +'%Y%m%d')-$(uuidgen | cut -c1-8) | ||||||
|
|
||||||
| - name: Install bundler | ||||||
| run: gem install bundler | ||||||
|
|
||||||
| - name: Run bundle update | ||||||
| run: | | ||||||
| bundle lock --update | ||||||
|
||||||
| bundle lock --update | |
| bundle update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Speaking of which… why == 'true'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Capitalization differs between the step titles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| --title "bundle update `/Gemfile`" \ | |
| --title "bundle update `/Gemfile.lock`" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the branch name is more convenient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dependabot supports weekly scheduling and even arbitrary
crontoo, if you’re looking to update the Lockfile less frequently.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, and batch updates too