From e597d69f5de24e5ce37a1a86de78e2188af049f9 Mon Sep 17 00:00:00 2001 From: ZehuaCao <47251317+Romanticoseu@users.noreply.github.com> Date: Tue, 13 Sep 2022 14:38:02 +0800 Subject: [PATCH] Add conditional judgment in scala-style-check and python-style-check (#5721) * add create-job-status-badge action * add selfHostedRunner input * add create badge job * change isSelfHostedRunner to is-self-hosted-runner * update create-job-status-badge * adjust indent * update python-style-check and scala-style-check * Update scala-style-check.yml * Update python-style-check.yml --- .github/workflows/python-style-check.yml | 3 ++- .github/workflows/scala-style-check.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-style-check.yml b/.github/workflows/python-style-check.yml index 0921d35efe5..a10d549ffb8 100644 --- a/.github/workflows/python-style-check.yml +++ b/.github/workflows/python-style-check.yml @@ -91,6 +91,7 @@ jobs: run: bash python/serving/dev/lint-python create-workflow-badge: + if: github.event.pull_request == '' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -101,4 +102,4 @@ jobs: secret: ${{ secrets.GIST_SECRET }} gist-id: 515298657716ead4615f539244730bf0 file-name: python-style-check.json - type: workflow \ No newline at end of file + type: workflow diff --git a/.github/workflows/scala-style-check.yml b/.github/workflows/scala-style-check.yml index 61e799c875c..3ced36d5438 100644 --- a/.github/workflows/scala-style-check.yml +++ b/.github/workflows/scala-style-check.yml @@ -72,6 +72,7 @@ jobs: create-workflow-badge: + if: github.event.pull_request == '' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3