Skip to content

Commit de8afad

Browse files
authored
ci: update lock on dependabot (#7)
1 parent 0dd961b commit de8afad

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Dependabot Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- 'dependabot/npm_and_yarn/**'
7+
8+
jobs:
9+
check-dependabot-changes:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
ref: ${{ github.event.pull_request.head.ref }}
18+
- uses: oven-sh/setup-bun@v1
19+
20+
- name: Install dependencies
21+
run: bun install
22+
23+
- name: Check for changes in bun.lockdb
24+
id: check-changes
25+
run: echo "lockbChanged=$(git diff --name-only | grep -q 'bun.lockb' && echo true || echo false)" >> $GITHUB_ENV
26+
shell: bash
27+
28+
- name: Commit and push if bun.lockdb changed
29+
if: env.lockbChanged == 'true'
30+
run: |
31+
git config user.name "github-actions[bot]"
32+
git config user.email "github-actions[bot]@users.noreply.github.com"
33+
git add bun.lockb
34+
git commit -m "chore: update lock file"
35+
git push

0 commit comments

Comments
 (0)