Module: kamailio
Branch: master
Commit: 2fbea39d4125be89f36cce161f9e6b0dbcd50595
URL: 
https://github.com/kamailio/kamailio/commit/2fbea39d4125be89f36cce161f9e6b0dbcd50595

Author: Victor Seva <linuxman...@torreviejawireless.org>
Committer: Victor Seva <linuxman...@torreviejawireless.org>
Date: 2024-12-11T13:15:09+01:00

github: codeql use same strategy for nightly builds [skip ci]

---

Modified: .github/workflows/codeql.yml

---

Diff:  
https://github.com/kamailio/kamailio/commit/2fbea39d4125be89f36cce161f9e6b0dbcd50595.diff
Patch: 
https://github.com/kamailio/kamailio/commit/2fbea39d4125be89f36cce161f9e6b0dbcd50595.patch

---

diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 84460230bba..3fe6ef06cfa 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -6,7 +6,27 @@ on:
   # Allows you to run this workflow manually from the Actions tab
   workflow_dispatch:
 jobs:
+  # is required nightly build?
+  # More info at 
https://stackoverflow.com/questions/63014786/how-to-schedule-a-github-actions-nightly-build-but-run-it-only-when-there-where
+  check:
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+    steps:
+      - uses: octokit/request-action@v2.x
+        id: check_last_run
+        with:
+          route: GET 
/repos/{owner}/{repo}/actions/workflows/alpine.yml/runs?per_page=1&status=completed
+          owner: ${{ github.repository_owner }}
+          repo: kamailio
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - run: "echo Last daily build: ${{ 
fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}"
+    outputs:
+      last_sha: ${{ 
fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}
   analyze:
+    needs: [check]
+    if: needs.check.outputs.last_sha != github.sha
     name: Analyze
     runs-on: [self-hosted, linux, x64, codeql]
     permissions:

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to