-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (58 loc) · 2.39 KB
/
Copy pathcheck-update.yml
File metadata and controls
61 lines (58 loc) · 2.39 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
name: Check Update
on:
schedule:
- cron: '43 20 * * *'
workflow_dispatch:
jobs:
check:
name: Check Update
runs-on: windows-latest
env:
TZ: 'Asia/Tokyo'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 'lts/*'
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn run check-update
# The pull request opened below is created with GITHUB_TOKEN, and GitHub
# does not trigger workflows for events raised by that token, so lint.yml
# never runs on it — #968 has had no checks at all since 2025-10. These
# two steps are the only check the update gets.
#
# They deliberately do not gate the pull request. One malformed upstream
# entry would otherwise withhold every valid update batched with it, and
# a failure is more useful reviewed than suppressed. The result goes into
# the pull request body, and the job fails once the pull request exists so
# the scheduled run still goes red.
- name: Generate the published JSON
id: generate
continue-on-error: true
run: yarn run release
- name: Validate the generated data against the schema
id: schema
continue-on-error: true
run: yarn run lint:jsonschema
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
# Add a CREATE_PR_TOKEN secret holding a personal access token to have
# the pull request trigger workflows the normal way; the fallback keeps
# today's behaviour when it is absent.
token: ${{ secrets.CREATE_PR_TOKEN || secrets.GITHUB_TOKEN }}
commit-message: Update packages data
branch: create-pull-request/check-update
delete-branch: true
title: '[Update] Update packages data'
body: |
Update some packages data
Schema validation: ${{ (steps.generate.outcome == 'success' && steps.schema.outcome == 'success') && 'passed' || '**FAILED** — check the workflow run before merging' }}
labels: enhancement
assignees: hal-shu-sato
reviewers: hal-shu-sato
- name: Fail if the generated data is invalid
if: steps.generate.outcome == 'failure' || steps.schema.outcome == 'failure'
run: exit 1