put dependabot filter back in
This commit is contained in:
parent
b00b20c99b
commit
00ffc69b4a
2 changed files with 7 additions and 9 deletions
14
.github/workflows/dependabot-sync.yml
vendored
14
.github/workflows/dependabot-sync.yml
vendored
|
@ -1,20 +1,17 @@
|
|||
name: Sync Dependabot Bump
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, reopened, edited]
|
||||
permissions:
|
||||
pull-requests: write
|
||||
types: [opened, synchronize]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
name: Sync dependency files
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
|
@ -28,8 +25,9 @@ jobs:
|
|||
run: node ./scripts/sync-dependencies.mjs ${{ github.head_ref }}
|
||||
- name: Commit Changes
|
||||
run: |
|
||||
git add .
|
||||
git status
|
||||
git config user.name github-actions
|
||||
git config user.email github-actions@github.com
|
||||
git commit -am "[dependabot skip] bumped ${{ github.head_ref }} changes in config/dependencies.yaml"
|
||||
git commit -m "[dependabot skip] bumped ${{ github.head_ref }} changes in config/dependencies.yaml"
|
||||
git push
|
||||
|
|
|
@ -26,7 +26,7 @@ const dependency = branchName
|
|||
// because this is from dependabot,
|
||||
// and because we want all our versions synced
|
||||
// we simply find and replace the version wherever it is specified
|
||||
const rgx = new RegExp(`(?<='${dependency}':\\W{0,2}\\w*\\W?')\\d+\\.\\d+\\.\\d+(?=')`, 'g')
|
||||
const rgx = new RegExp(`(?<='@?${dependency}':\\W{0,2}\\w*\\W?')\\d+\\.\\d+\\.\\d+(?=')`, 'g')
|
||||
const newDepsRaw = oldDepsRaw.replace(rgx, dependencyVersion)
|
||||
console.log(`Updating ${dependency} version to ${dependencyVersion} in config/dependencies.yaml`)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue