Skip to content

Commit

Permalink
chore(deps): add workflow to update lockfile (#1729)
Browse files Browse the repository at this point in the history
  • Loading branch information
osipov-mit authored Jan 21, 2025
1 parent 707a7ff commit b3cab84
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 18 deletions.
44 changes: 26 additions & 18 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,67 @@ version: 2
updates:
- package-ecosystem: 'npm'
directory: /
open-pull-requests-limit: 5
open-pull-requests-limit: 1
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore(repo):'
groups:
all-dependencies:
all:
patterns:
- '*'

- package-ecosystem: 'npm'
directory: '/apis/gear'
open-pull-requests-limit: 5
open-pull-requests-limit: 1
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore(api):'
groups:
all-dependencies:
patterns:
- '*'
development:
dependency-type: 'development'
production:
dependency-type: 'production'

- package-ecosystem: 'npm'
directories:
- '/idea/gear/*'
open-pull-requests-limit: 5
open-pull-requests-limit: 1
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore(gear-idea):'
groups:
all-dependencies:
patterns:
- '*'
development:
dependency-type: 'development'
production:
dependency-type: 'production'

- package-ecosystem: 'npm'
directories:
- '/utils/*'
open-pull-requests-limit: 5
open-pull-requests-limit: 1
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore(utils):'
groups:
all-dependencies:
patterns:
- '*'
development:
dependency-type: 'development'
production:
dependency-type: 'production'

- package-ecosystem: 'npm'
directories:
- '/tools/*'
open-pull-requests-limit: 5
open-pull-requests-limit: 1
schedule:
interval: 'weekly'
commit-message:
prefix: 'chore(tools):'
groups:
all-dependencies:
patterns:
- '*'
development:
dependency-type: 'development'
production:
dependency-type: 'production'
35 changes: 35 additions & 0 deletions .github/workflows/update-lockfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow is needed to update yarn.lock file on dependabot PRs
# It is needed because dependabot doesn't support yarn v4 yet
# After https://github.com/dependabot/dependabot-core/issues/8610 is resolved, this workflow should be removed

name: 'Update yarn.lock'

on:
pull_request:
branches: [main]
paths:
- '**/package.json'

jobs:
update-lockfile:
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: 'Install Node.js 20.x'
uses: actions/setup-node@v4
with:
node-version: 20.x

- name: 'Update lock file'
run: yarn install --mode=update-lockfile

- name: 'Commit changes'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: update yarn.lock'
file_pattern: 'yarn.lock'

0 comments on commit b3cab84

Please sign in to comment.