Skip to content

Commit 0bcea28

Browse files
committed
tools: add option to run workflow with specific tool id
1 parent b8c7a1e commit 0bcea28

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

.github/workflows/tools.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,35 @@ on:
55
- cron: 5 0 * * 0
66

77
workflow_dispatch:
8+
inputs:
9+
id:
10+
description: The ID of the job to run
11+
required: true
12+
default: all
13+
type: choice
14+
options:
15+
- all
16+
- acorn
17+
- acorn-walk
18+
- ada
19+
- base64
20+
- brotli
21+
- c-ares
22+
- cjs-module-lexer
23+
- corepack
24+
- doc
25+
- eslint
26+
- libuv
27+
- lint-md-dependencies
28+
- llhttp
29+
- nghttp2
30+
- nghttp3
31+
- ngtcp2
32+
- postject
33+
- root-certificates
34+
- simdutf
35+
- undici
36+
- uvwasi
837

938
permissions:
1039
contents: read
@@ -200,16 +229,19 @@ jobs:
200229
rm temp-output
201230
steps:
202231
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
232+
if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id
203233
with:
204234
persist-credentials: false
205235
- run: ${{ matrix.run }}
236+
if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id
206237
env:
207238
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
208239
- name: Generate commit message if not set
209-
if: ${{ env.COMMIT_MSG == '' }}
240+
if: env.COMMIT_MSG == '' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id)
210241
run: |
211242
echo "COMMIT_MSG=${{ matrix.subsystem }}: update ${{ matrix.id }} to ${{ env.NEW_VERSION }}" >> "$GITHUB_ENV"
212243
- uses: gr2m/create-or-update-pull-request-action@77596e3166f328b24613f7082ab30bf2d93079d5
244+
if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id
213245
# Creates a PR or update the Action's existing PR, or
214246
# no-op if the base branch is already up-to-date.
215247
env:

0 commit comments

Comments
 (0)