提交 7b34936a 编写于 作者: L luzzyzhang 提交者: XindaH

ci(yaml): fix workflow job trigger event error

上级 cbf3bb18
......@@ -8,27 +8,30 @@ on:
jobs:
check-commit:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request }}
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- uses: actions/setup-node@v2.1.0
- run: yarn add @commitlint/config-conventional @commitlint/cli
- run: yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD
- name: Check commit
if: ${{ github.event.pull_request }}
run: |
yarn add @commitlint/config-conventional @commitlint/cli
yarn commitlint --from ${{ github.event.pull_request.base.sha }} --to HEAD
check-format:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request }}
steps:
- uses: actions/checkout@v2.3.1
with:
fetch-depth: 0
- name: Set up Python
if: ${{ github.event.pull_request }}
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Cache pip
if: ${{ github.event.pull_request }}
uses: actions/cache@v2
with:
# This path is specific to Ubuntu
......@@ -39,9 +42,11 @@ jobs:
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
if: ${{ github.event.pull_request }}
run: |
python -m pip install --upgrade pip
- name: Check format
if: ${{ github.event.pull_request }}
run: |
./ci/run_format_check.sh
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册