Skip to content

Commit cfdc05a

Browse files
authored
chore: Create dependabot PR automation (#5265)
1 parent f11b80e commit cfdc05a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: auto-dependabot-fix
2+
3+
on:
4+
pull_request: ~
5+
6+
jobs:
7+
building:
8+
if: github.actor == 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
ref: ${{ github.event.pull_request.head.ref }}
15+
token: ${{ secrets.GH_CLOUD_SDK_JS_ADMIN_WRITE_TOKEN }}
16+
- run: git fetch --depth=1
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: 'yarn'
21+
- name: Install Dependencies & Compile
22+
run: yarn install --frozen-lockfile --ignore-engines
23+
- name: Commit Changes if needed
24+
run: |
25+
diff=`git diff`
26+
if [ ! -z "$diff" ]; then
27+
git config --global user.email "[email protected]"
28+
git config --global user.name "cloud-sdk-js"
29+
git commit -m "Regenerate check-public-api action" -a
30+
git push
31+
fi

0 commit comments

Comments
 (0)