Skip to content

Commit 7eb0b1f

Browse files
committed
Update GitHub Actions
Signed-off-by: Sora Morimoto <[email protected]>
1 parent 3c676d6 commit 7eb0b1f

File tree

1 file changed

+6
-64
lines changed

1 file changed

+6
-64
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -14,81 +14,23 @@ jobs:
1414
- ubuntu-latest
1515
- windows-latest
1616
node-version:
17-
- 16.x
18-
- 18.x
17+
- 20
18+
- 22
1919

2020
runs-on: ${{ matrix.os }}
2121

2222
steps:
2323
- name: Checkout tree
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

26-
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
26+
- name: Set-up Node.js
27+
uses: actions/setup-node@v4
2828
with:
2929
node-version: ${{ matrix.node-version }}
30+
check-latest: true
3031

3132
- name: Install npm packages
3233
run: npm ci --ignore-scripts
3334

3435
- name: Run the tests
3536
run: npm run test-all
36-
37-
dependabot-auto-approve:
38-
name: Dependabot auto-approve
39-
40-
permissions:
41-
pull-requests: write
42-
43-
needs:
44-
- build-and-test
45-
46-
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
47-
48-
runs-on: ubuntu-latest
49-
50-
steps:
51-
- name: Fetch Dependabot metadata
52-
id: metadata
53-
uses: dependabot/fetch-metadata@v1
54-
55-
- name: Get the PR review decision
56-
id: gh-pr-review
57-
run: echo "decision=$(gh pr view --json reviewDecision --jq '. | .reviewDecision' "$PR_URL")" >>"$GITHUB_OUTPUT"
58-
env:
59-
PR_URL: ${{ github.event.pull_request.html_url }}
60-
GITHUB_TOKEN: ${{ github.token }}
61-
62-
- name: Approve a PR
63-
if: ${{ steps.gh-pr-review.outputs.decision != 'APPROVED' && steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
64-
run: gh pr review --approve "$PR_URL"
65-
env:
66-
PR_URL: ${{ github.event.pull_request.html_url }}
67-
GITHUB_TOKEN: ${{ github.token }}
68-
69-
dependabot-auto-merge:
70-
name: Dependabot auto-merge
71-
72-
permissions:
73-
contents: write
74-
pull-requests: write
75-
76-
if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
77-
78-
needs:
79-
- build-and-test
80-
- dependabot-auto-approve
81-
82-
runs-on: ubuntu-latest
83-
84-
steps:
85-
- name: Fetch Dependabot metadata
86-
id: metadata
87-
uses: dependabot/fetch-metadata@v1
88-
89-
- name: Merge Dependabot PR
90-
if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' }}
91-
run: gh pr merge --auto --merge "$PR_URL"
92-
env:
93-
PR_URL: ${{ github.event.pull_request.html_url }}
94-
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)