mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
support skip ci in azure pipelines, and support it properly in github actions pipelines (#17561)
* support skip ci in azure pipelines * [skip ci] example of a commit that skips CI * example of a commit that does not skip CI * fix github actions logic for ci skip handling * [skip ci] example of a commit that skips CI for all pipelines * example of a commit that does not skip CI for any pipeline
This commit is contained in:
13
.github/workflows/ci_docs.yml
vendored
13
.github/workflows/ci_docs.yml
vendored
@@ -30,8 +30,9 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# see D20210329T004830
|
||||
if: |
|
||||
!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[skip ci]')
|
||||
!contains(format('{0}', github.event.pull_request.title), '[skip ci]')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -50,6 +51,16 @@ jobs:
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: 'Check whether to skip CI'
|
||||
shell: bash
|
||||
run: |
|
||||
# see D20210329T004830
|
||||
commitMsg=$(git log --no-merges -1 --pretty=format:"%s")
|
||||
echo commitMsg: $commitMsg
|
||||
echo $commitMsg | grep -v '\[skip ci\]'
|
||||
|
||||
- name: 'Install build dependencies (macOS)'
|
||||
if: runner.os == 'macOS'
|
||||
|
||||
14
.github/workflows/ci_packages.yml
vendored
14
.github/workflows/ci_packages.yml
vendored
@@ -3,8 +3,9 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# see D20210329T004830
|
||||
if: |
|
||||
!contains(format('{0} {1}', github.event.head_commit.message, github.event.pull_request.title), '[skip ci]')
|
||||
!contains(format('{0}', github.event.pull_request.title), '[skip ci]')
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -19,6 +20,17 @@ jobs:
|
||||
steps:
|
||||
- name: 'Checkout'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: 'Check whether to skip CI'
|
||||
shell: bash
|
||||
run: |
|
||||
# see D20210329T004830
|
||||
commitMsg=$(git log --no-merges -1 --pretty=format:"%s")
|
||||
echo commitMsg: $commitMsg
|
||||
echo $commitMsg | grep -v '\[skip ci\]'
|
||||
|
||||
- name: 'Checkout csources'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user