Skip to content

Commit 5d66b61

Browse files
committed
☕ Use molt for updating dependencies
1 parent a9b12fc commit 5d66b61

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

.github/workflows/udd.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/update.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: update
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
update:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: denoland/setup-deno@v1
14+
with:
15+
deno-version: 1.x
16+
- name: Configure Git
17+
run: |
18+
git config user.name github-actions[bot]
19+
git config user.email github-actions[bot]@users.noreply.github.com
20+
- name: Update dependencies and commit changes
21+
run: deno task -q upgrade:commit --summary ../title.txt --report ../body.md
22+
- name: Check result
23+
id: result
24+
uses: andstor/file-existence-action@v2
25+
with:
26+
files: ../title.txt, ../body.md
27+
- name: Read title.txt
28+
id: title
29+
if: steps.result.outputs.files_exists == 'true'
30+
uses: juliangruber/read-file-action@v1
31+
with:
32+
path: ../title.txt
33+
- name: Read body.md
34+
id: body
35+
if: steps.result.outputs.files_exists == 'true'
36+
uses: juliangruber/read-file-action@v1
37+
with:
38+
path: ../body.md
39+
- name: Create a pull request
40+
if: steps.result.outputs.files_exists == 'true'
41+
uses: peter-evans/create-pull-request@v5
42+
with:
43+
token: ${{ secrets.PA_TOKEN }}
44+
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
45+
branch: automation/update-dependencies
46+
title: ${{ steps.title.outputs.content }}
47+
body: ${{ steps.body.outputs.content }}
48+
labels: automation
49+
delete-branch: true

deno.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"test": "deno test --unstable -A --doc --parallel --shuffle --coverage=.coverage",
55
"check": "deno check --unstable $(find . -name '*.ts')",
66
"coverage": "deno coverage --unstable .coverage",
7-
"upgrade": "deno run -A https://deno.land/x/udd/main.ts $(find . -name '*.ts')",
7+
"upgrade": "deno run -q -A https://deno.land/x/molt@0.11.0/cli.ts ./**/*.ts",
8+
"upgrade:commit": "deno task -q upgrade --commit --prefix :package: --pre-commit=fmt",
89
"gen:function": "deno run --unstable -A ./scripts/gen-function/gen-function.ts",
910
"gen:option": "deno run --unstable -A ./scripts/gen-option/gen-option.ts",
1011
"gen": "deno task gen:function && deno task gen:option && deno fmt"

0 commit comments

Comments
 (0)