From 2769173850f78749a870ed051a894317141594fc Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Fri, 14 May 2021 22:25:14 +0200 Subject: [PATCH] Restrict additional CI jobs (#6539) The new upload-docs CI job is currently run unconditionally after the CI job finishes. It can only work, though, if the CI job worked and stored an artifact. The PR update job is run for all commits on master, though it only has the necessary token when running on the main repository. This PR restricts both jobs to cases where they work. --- .github/workflows/docs_upload.yml | 2 +- .github/workflows/update_pr.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs_upload.yml b/.github/workflows/docs_upload.yml index 5b5ee32f8..356337de6 100644 --- a/.github/workflows/docs_upload.yml +++ b/.github/workflows/docs_upload.yml @@ -11,7 +11,7 @@ jobs: name: upload-docs runs-on: ubuntu-latest continue-on-error: true - if: github.repository == 'cvc5/cvc5' + if: github.repository == 'cvc5/cvc5' && github.event.workflow_run.conclusion == 'success' steps: - name: Setup Deploy Key env: diff --git a/.github/workflows/update_pr.yml b/.github/workflows/update_pr.yml index eb7585e0e..3fab922c7 100644 --- a/.github/workflows/update_pr.yml +++ b/.github/workflows/update_pr.yml @@ -7,6 +7,7 @@ on: jobs: autoupdate: runs-on: ubuntu-latest + if: github.repository == 'cvc5/cvc5' steps: - name: Automatically update PR uses: adRise/update-pr-branch@v0.5.1 -- 2.30.2