-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavascript--daily-dependencies-update.yml
More file actions
79 lines (68 loc) · 2.81 KB
/
Copy pathjavascript--daily-dependencies-update.yml
File metadata and controls
79 lines (68 loc) · 2.81 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This workflow updates pnpm package dependencies every day and opens a pull
# request when any dependency changes are detected.
name: JavaScript - Daily Dependencies Update
on:
schedule:
# 0:00 JST every day
- cron: "0 15 * * *"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update_pnpm_package_dependencies:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-nodejs
with:
working-directory: ./javascript
- name: Update pnpm Package Dependencies
working-directory: ./javascript
run: |
corepack use pnpm@latest
pnpm update
- name: Generate Pull Request Description
env:
BODY_PATH: ${{ runner.temp }}/pr_body.md
run: |
{
cat <<'OVERVIEW'
## 1. Overview
This pull request was created automatically by the JavaScript - Daily Dependencies Update workflow.
It updates pnpm itself (pinning the new version to the packageManager field of package.json), updates every pnpm package dependency to the latest version allowed by package.json, and regenerates pnpm-lock.yaml:
~~~console
corepack use pnpm@latest
pnpm update
~~~
## 2. Key Changes & Differences
OVERVIEW
echo
bash .github/scripts/dependency_report.sh pnpm javascript/pnpm-lock.yaml javascript/package.json Packages
cat <<SUMMARY
## 3. Summary
The pnpm version pinned in javascript/package.json and all pnpm package dependencies in javascript/pnpm-lock.yaml are now up to date.
Please make sure that all CI workflows pass before merging this pull request.
## 4. References
- [JavaScript - Daily Dependencies Update workflow run](https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID)
- [pnpm update documentation](https://pnpm.io/cli/update)
- [npm](https://www.npmjs.com/)
SUMMARY
} > "$BODY_PATH"
- name: Compute Timestamp
run: echo "TIMESTAMP=$(TZ=Asia/Tokyo date '+%Y-%m-%d %H:%M:%S JST')" >> "$GITHUB_ENV"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
sign-commits: true
branch: hayat01sh1da/daily/update-pnpm-package-dependencies
delete-branch: true
add-paths: |
javascript/package.json
javascript/pnpm-lock.yaml
commit-message: "[Daily][JavaScript] Update pnpm Package Dependencies at ${{ env.TIMESTAMP }}"
title: "[Daily][JavaScript] Update pnpm Package Dependencies"
body-path: ${{ runner.temp }}/pr_body.md
reviewers: hayat01sh1da
assignees: hayat01sh1da