Always run update-pr (#7719)
authorGereon Kremer <gkremer@stanford.edu>
Tue, 30 Nov 2021 23:10:30 +0000 (15:10 -0800)
committerGitHub <noreply@github.com>
Tue, 30 Nov 2021 23:10:30 +0000 (23:10 +0000)
This removes the event condition on the `update-pr` ci job. Right now, it is not run although it should.

.github/workflows/cancel.yml [new file with mode: 0644]
.github/workflows/ci.yml

diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml
new file mode 100644 (file)
index 0000000..9691fe2
--- /dev/null
@@ -0,0 +1,15 @@
+
+name: Cancel
+on:
+  workflow_run:
+    workflows: ["CI"]
+    types:
+      - requested
+
+jobs:
+  cancel:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: styfle/cancel-workflow-action@0.9.1
+        with:
+          workflow_id: ${{ github.event.workflow.id }}
index d2d69effe6d70b0a1011e6dd178b2f2bdc93932a..59a26838e139a35b6480f2d5ab31107b49690ec6 100644 (file)
@@ -2,14 +2,6 @@ on: [push, pull_request]
 name: CI
 
 jobs:
-  cancel:
-    runs-on: ubuntu-latest
-    steps:
-      - name: Cancel Previous Runs
-        uses: styfle/cancel-workflow-action@0.5.0
-        with:
-          access_token: ${{ github.token }}
-
   build:
     strategy:
       matrix:
@@ -122,8 +114,8 @@ jobs:
 
   update-pr:
     runs-on: ubuntu-latest
+    if: github.repository == 'cvc5/cvc5' && github.event_name == 'push'
     needs: build
-    if: github.repository == 'cvc5/cvc5' && github.event == 'push'
     steps:
       - name: Automatically update PR
         uses: adRise/update-pr-branch@v0.5.1