Skip to content

Commit

Permalink
Now GH actions support skip ci officially
Browse files Browse the repository at this point in the history
  • Loading branch information
outsideris committed Feb 20, 2021
1 parent e1194ab commit 613e199
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/mocha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,8 @@ name: Tests
- reopened

jobs:
prepare-commit-msg:
name: Retrieve head commit message
runs-on: ubuntu-latest
# Run 'pull-request' event only on external PRs from forked repos.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
outputs:
HEAD_COMMIT_MSG: '${{ steps.commitMsg.outputs.HEAD_COMMIT_MSG }}'
steps:
- uses: actions/checkout@v2
if: github.event_name == 'pull_request'
- name: find commit msg for PR
id: commitMsg
if: github.event_name == 'pull_request'
run: >-
echo "::set-output name=HEAD_COMMIT_MSG::$(git log --no-merges -1
--oneline)"
check-skip:
name: Check to skip CI
needs: prepare-commit-msg
runs-on: ubuntu-latest
if: >-
${{ !contains(github.event.head_commit.message, '[ci skip]') &&
!contains(needs.prepare-commit-msg.outputs.HEAD_COMMIT_MSG, '[ci skip]')
}}
steps:
- run: 'echo "${{ github.event.head_commit.message }}"'

smoke:
name: 'Smoke [Node.js v${{ matrix.node }} / ${{ matrix.os }}]'
needs: check-skip
runs-on: '${{ matrix.os }}'
strategy:
matrix:
Expand Down

0 comments on commit 613e199

Please sign in to comment.