From c0e9f57fdbd5049eb5e8d479c10b7d85bccaf21f Mon Sep 17 00:00:00 2001 From: Shohei Ueda <30958501+peaceiris@users.noreply.github.com> Date: Fri, 19 Jun 2020 20:46:22 +0900 Subject: [PATCH] ci: add is_skip [skip ci] --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8332f2dd..4c998102 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,12 +13,18 @@ on: jobs: skipci: runs-on: ubuntu-18.04 + outputs: + is_skip: ${{ steps.is_skip.outputs.is_skip }} steps: - - run: echo "[skip ci] ${{ contains(github.event.head_commit.message, '[skip ci]') }}" + - name: Set is_skip + id: is_skip + run: echo "::set-output name=is_skip::${{ contains(github.event.head_commit.message, '[skip ci]') }}" + - run: echo "[skip ci] ${{ steps.is_skip.outputs.is_skip }}" test: runs-on: ${{ matrix.os }} - if: contains(github.event.head_commit.message, '[skip ci]') == false + needs: skipci + if: ${{ ! needs.skipci.outputs.is_skip }} strategy: matrix: os: