Restrict additional CI jobs (#6539)
authorGereon Kremer <nafur42@gmail.com>
Fri, 14 May 2021 20:25:14 +0000 (22:25 +0200)
committerGitHub <noreply@github.com>
Fri, 14 May 2021 20:25:14 +0000 (20:25 +0000)
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
.github/workflows/update_pr.yml

index 5b5ee32f867a22a605d241fee8022c34793f43d0..356337de6ad24244721d3fbafb00bfd6bc48bae4 100644 (file)
@@ -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:
index eb7585e0e580b746766522a4716a31e07f6542d7..3fab922c7361a48d8101d9f8821a39f35300a36f 100644 (file)
@@ -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