Skip to content

Commit 52292f7

Browse files
author
Andrei Jiroh Eugenio Halili
committed
Update Dependabot + add Create Pull Request action to our generate-lockfile action
Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
1 parent ef306de commit 52292f7

File tree

3 files changed

+36
-11
lines changed

3 files changed

+36
-11
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ updates:
88
- package-ecosystem: "npm"
99
directory: "/"
1010
schedule:
11-
interval: "daily"
11+
interval: "weekly"
1212
reviewers:
1313
- AndreiJirohHaliliDev2006
14+
labels:
15+
- packages/nodejs-npm
16+
- dependencies
17+
- Updated by Dependabot

.github/workflows/generate-lockfile.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Generate Yarn lockfile
1+
name: Update dependencies and generate new lockfile
22

33
on:
44
workflow_dispatch:
@@ -21,12 +21,8 @@ jobs:
2121
run: curl -fsSL https://github.com/code-server-boilerplates/charts/raw/main/scripts/setup-ci | bash
2222
- name: Update npmjs
2323
run: npm i -g npm@latest
24-
- name: Setup Yarn Berry
25-
shell: bash
26-
run: |
27-
git switch -c update-lockfiles-$GITHUB_RUN_ID origin/master
2824
- name: Run install CI
29-
run: npm ci
25+
run: npm install && npm ci || true
3026
- name: Attempt to upgrade dependencies
3127
run: |
3228
echo "::addgroup::List outdated packages"
@@ -44,7 +40,33 @@ jobs:
4440
git status -s
4541
echo "::endgroup::"
4642
sleep 30
47-
- name: Commit changes
43+
- name: Generate pull request
44+
uses: peter-evans/create-pull-request@v3
45+
id: cpr
46+
with:
47+
token: ${{ secrets.GH_SERVICE_ACCOUNT_API_KEY }}
48+
author: Recap Time Bot <releases@madebythepins.tk>
49+
commiter: Recap Time Bot <releases@madebythepins.tk>
50+
signoff: true
51+
commit-message: Update npm dependencies and lockfile
52+
branch: update-dependencies-npmjs
53+
labels: |
54+
packages/nodejs-npm
55+
dependencies
56+
reviewers: ${{ github.actor }}
57+
assignees:
58+
title: Update npmjs lockfiles and dependencies
59+
description: |
60+
Hey, ${{ github.actor }}.
61+
62+
Your PR has been successfully generated to update dependencies and lockfile. Please wait while Vercel is doing an build for our website to ensure there will be no breaking changes to be merged to production.
63+
64+
When the build status goes green, approve and add `Ready to Ship` label to automagically merge.
65+
Before merging, make sure you read the changelog of these updated packages before proceeding.
66+
67+
---
68+
69+
_This PR is generated using [this GitHub action](https://github.com/peter-evans/create-pull-request), btw._
70+
- name: Extract PR link
4871
run: |
49-
git commit -m "Updated npmjs lockfiles and dependencies" --signoff
50-
git push origin update-lockfiles-$GITHUB_RUN_ID
72+
echo "An PR has been generated to update npm dependencies. Go to ${{ steps.cpr.outputs.pull-request-url }} to complete the merge request workflow."

.github/workflows/update-labels.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
# These labels included in your default labels settings are excluded
2525
# you need to manually add them to .github/labels.yml and remove the entries here
2626
exclude: |
27-
documentation
2827
help wanted
2928
wontfix
3029
bug

0 commit comments

Comments
 (0)