Skip to content

Commit 305eec0

Browse files
committed
Add workflow file to create PR
1 parent c3322a0 commit 305eec0

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Auto bump latest tested NPM packages
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Every Sunday at midnight
6+
workflow_dispatch:
7+
8+
jobs:
9+
bump_package_versions:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
actions: read # read secrets
13+
contents: write # Creates a branch
14+
pull-requests: write # Creates a PR
15+
env:
16+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
24+
with:
25+
node-version: '18'
26+
27+
- name: Install dependencies
28+
run: yarn install
29+
30+
- name: Update package versions in latests.json
31+
run: node scripts/outdated.js
32+
33+
- name: Create Pull Request
34+
id: pr
35+
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284 # v7.0.7
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
branch: "bot/test-package-versions-bump"
39+
commit-message: "[Test Package Versions Bump]"
40+
delete-branch: true
41+
base: master
42+
title: "[Test Package Versions Bump] Updating package versions"
43+
labels: dependencies
44+
body: |
45+
Automated update of the latest versions of NPM packages used in tests.
46+
47+
# If desired we can enable automerge with the necessary PAT created
48+
# - name: Enable Pull Request Automerge
49+
# if: steps.pr.outputs.pull-request-operation == 'created'
50+
# uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d # v3.0.0
51+
# with:
52+
# token: ${{ secrets.GHA_PAT }}
53+
# pull-request-number: ${{ steps.pr.outputs.pull-request-number }}

0 commit comments

Comments
 (0)