You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2020/10/20 08:22:24 UTC

[airflow] branch master updated: Removes separate cancel codeql workflow (#11672)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 318f18f  Removes separate cancel codeql workflow (#11672)
318f18f is described below

commit 318f18f5a835f457c6a68426a476af89ace0c7e7
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Tue Oct 20 10:21:46 2020 +0200

    Removes separate cancel codeql workflow (#11672)
    
    The capability was added in the cancel-workflow-run action to
    cancel another workflow by name. We utilise it to merge canceling
    of codeql workflow duplicates into the main build/cancel workflow
---
 .github/workflows/build-images-workflow-run.yml | 17 ++++++++++++-----
 .github/workflows/codeql-cancel.yml             | 22 ----------------------
 2 files changed, 12 insertions(+), 27 deletions(-)

diff --git a/.github/workflows/build-images-workflow-run.yml b/.github/workflows/build-images-workflow-run.yml
index 853feac..c5858f8 100644
--- a/.github/workflows/build-images-workflow-run.yml
+++ b/.github/workflows/build-images-workflow-run.yml
@@ -66,7 +66,7 @@ jobs:
           token: ${{ secrets.GITHUB_TOKEN }}
           sourceRunId: ${{ github.event.workflow_run.id }}
       - name: "Cancel duplicated 'CI Build' runs"
-        uses: potiuk/cancel-workflow-runs@f696c622a83e4a63fff74848d3b149074658607d # v3_2
+        uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
           cancelMode: duplicates
@@ -84,7 +84,7 @@ jobs:
         # in GitHub Actions, we have to use Job names to match Event/Repo/Branch from the
         # build-info step there to find the duplicates ¯\_(ツ)_/¯.
 
-        uses: potiuk/cancel-workflow-runs@f696c622a83e4a63fff74848d3b149074658607d # v3_2
+        uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
         with:
           cancelMode: namedJobs
           token: ${{ secrets.GITHUB_TOKEN }}
@@ -105,7 +105,7 @@ jobs:
         # can cancel all the matching "Build Images" workflow runs in the two following steps.
         # Yeah. Adding to the complexity ¯\_(ツ)_/¯.
 
-        uses: potiuk/cancel-workflow-runs@f696c622a83e4a63fff74848d3b149074658607d # v3_2
+        uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
         id: cancel-failed
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
@@ -140,12 +140,19 @@ jobs:
         # it to cancel any jobs that have matching names containing Source Run Id:
         # followed by one of the run ids. Yes I know it's super complex ¯\_(ツ)_/¯.
         if: env.BUILD_IMAGES == 'true' && steps.source-run-info-failed.outputs.cancelledRuns != '[]'
-        uses: potiuk/cancel-workflow-runs@f696c622a83e4a63fff74848d3b149074658607d # v3_2
+        uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
         with:
           cancelMode: namedJobs
           token: ${{ secrets.GITHUB_TOKEN }}
           notifyPRCancel: true
           jobNameRegexps: ${{ steps.extract-cancelled-failed-runs.outputs.matching-regexp }}
+      - name: "Cancel duplicated 'CodeQL' runs"
+        uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
+        id: cancel
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}
+          cancelMode: duplicates
+          workflowFileName: 'codeql-analysis.yml'
       - name: "Set Docker Cache Directive"
         id: cache-directive
         run: |
@@ -374,7 +381,7 @@ jobs:
     needs: [build-images]
     steps:
       - name: "Canceling the 'CI Build' source workflow in case of failure!"
-        uses: potiuk/cancel-workflow-runs@f696c622a83e4a63fff74848d3b149074658607d # v3_2
+        uses: potiuk/cancel-workflow-runs@0acb1c01f6740dfbca6eab6e21a5b5066e8bafb3 # v3_3
         with:
           token: ${{ secrets.GITHUB_TOKEN }}
           cancelMode: self
diff --git a/.github/workflows/codeql-cancel.yml b/.github/workflows/codeql-cancel.yml
deleted file mode 100644
index 2221d7a..0000000
--- a/.github/workflows/codeql-cancel.yml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-name: "Cancel duplicate CodeQL workflows"
-on:
-  workflow_run:
-    workflows: ["CodeQL"]
-    types: ['requested']
-jobs:
-  cancel-workflow-runs:
-    timeout-minutes: 10
-    name: "Cancel workflow runs"
-    runs-on: ubuntu-latest
-    if: github.repository == 'apache/airflow' || github.event.workflow_run.event != 'schedule'
-    steps:
-      - name: "Cancel duplicated 'CodeQL' runs"
-        uses: potiuk/cancel-workflow-runs@f696c622a83e4a63fff74848d3b149074658607d # v3_2
-        id: cancel
-        with:
-          token: ${{ secrets.GITHUB_TOKEN }}
-          cancelMode: duplicates
-          sourceRunId: ${{ github.event.workflow_run.id }}
-          notifyPRCancel: true
-          skipEventTypes: '["schedule", "push"]'