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
|
name: Sync Dependabot Bump
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, edited]
|
types: [opened, synchronize]
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync:
|
sync:
|
||||||
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||||
name: Sync dependency files
|
name: Sync dependency files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [16.x]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -28,8 +25,9 @@ jobs:
|
||||||
run: node ./scripts/sync-dependencies.mjs ${{ github.head_ref }}
|
run: node ./scripts/sync-dependencies.mjs ${{ github.head_ref }}
|
||||||
- name: Commit Changes
|
- name: Commit Changes
|
||||||
run: |
|
run: |
|
||||||
|
git add .
|
||||||
git status
|
git status
|
||||||
git config user.name github-actions
|
git config user.name github-actions
|
||||||
git config user.email github-actions@github.com
|
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
|
git push
|
||||||
|
|
|
@ -26,7 +26,7 @@ const dependency = branchName
|
||||||
// because this is from dependabot,
|
// because this is from dependabot,
|
||||||
// and because we want all our versions synced
|
// and because we want all our versions synced
|
||||||
// we simply find and replace the version wherever it is specified
|
// 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)
|
const newDepsRaw = oldDepsRaw.replace(rgx, dependencyVersion)
|
||||||
console.log(`Updating ${dependency} version to ${dependencyVersion} in config/dependencies.yaml`)
|
console.log(`Updating ${dependency} version to ${dependencyVersion} in config/dependencies.yaml`)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue