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

ci(yaml): fix workflow job trigger event error

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