-
Notifications
You must be signed in to change notification settings - Fork 10k
47 lines (40 loc) · 1.45 KB
/
update-jquery-validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Update jquery-validation
on:
schedule:
- cron: '0 0 1 * *' # Run on the first day of the month
workflow_dispatch: # Allow manual runs
pull_request:
branches:
- main
jobs:
update-jquery-validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Set RepoRoot
run: echo "RepoRoot=$(pwd)" >> $GITHUB_ENV
- name: Update dependencies
working-directory: ${{ env.RepoRoot }}/src/Mvc/build
run: |
npm install --no-lockfile
npm run build
echo "JQUERY_VALIDATE_VERSION=$(npm ls jquery-validation --json | jq -r '.dependencies["jquery-validation"].version')" >> $GITHUB_ENV
- name: Create Pull Request
uses: dotnet/actions-create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update jquery.validate to ${{ env.JQUERY_VALIDATE_VERSION }}
title: Update jquery.validate to ${{ env.JQUERY_VALIDATE_VERSION }}
body: |
Update jquery.validate to the latest version.
# The branch name is based on the date in the format YYYY-MM-DD
branch: update-jquery-validate-to-${{ env.JQUERY_VALIDATE_VERSION }}
base: main
paths: |
**/jquery.validate.js
**/jquery.validate.min.js