mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
ci: label for running CI on draft PRs (#24102)
This commit is contained in:
parent
eb218c0f33
commit
0544d60012
2 changed files with 4 additions and 3 deletions
3
.github/workflows/ci.generate.ts
vendored
3
.github/workflows/ci.generate.ts
vendored
|
@ -339,10 +339,11 @@ const ci = {
|
|||
...cloneRepoStep,
|
||||
{
|
||||
id: "check",
|
||||
if: "!contains(github.event.pull_request.labels.*.name, 'ci-draft')",
|
||||
run: [
|
||||
"GIT_MESSAGE=$(git log --format=%s -n 1 ${{github.event.after}})",
|
||||
"echo Commit message: $GIT_MESSAGE",
|
||||
"echo $GIT_MESSAGE | grep '\\[ci\\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT)",
|
||||
"echo $GIT_MESSAGE | grep '\\[ci\\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass or add the ci-draft label.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT)",
|
||||
].join("\n"),
|
||||
},
|
||||
]),
|
||||
|
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -37,11 +37,11 @@ jobs:
|
|||
submodules: false
|
||||
if: github.event.pull_request.draft == true
|
||||
- id: check
|
||||
if: 'github.event.pull_request.draft == true && (!contains(github.event.pull_request.labels.*.name, ''ci-draft''))'
|
||||
run: |-
|
||||
GIT_MESSAGE=$(git log --format=%s -n 1 ${{github.event.after}})
|
||||
echo Commit message: $GIT_MESSAGE
|
||||
echo $GIT_MESSAGE | grep '\[ci\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT)
|
||||
if: github.event.pull_request.draft == true
|
||||
echo $GIT_MESSAGE | grep '\[ci\]' || (echo 'Exiting due to draft PR. Commit with [ci] to bypass or add the ci-draft label.' ; echo 'skip_build=true' >> $GITHUB_OUTPUT)
|
||||
build:
|
||||
name: '${{ matrix.job }} ${{ matrix.profile }} ${{ matrix.os }}-${{ matrix.arch }}'
|
||||
needs:
|
||||
|
|
Loading…
Reference in a new issue