snuyanzin commented on code in PR #28348:
URL: https://github.com/apache/flink/pull/28348#discussion_r3369636581


##########
.github/workflows/nightly-trigger.yml:
##########
@@ -39,9 +40,38 @@ jobs:
         uses: actions/github-script@v7
         with:
           script: |
-            github.rest.actions.createWorkflowDispatch({
+            const branch = '${{ matrix.branch }}';
+
+            // Resolve the current HEAD of the branch.
+            const { data: branchData } = await github.rest.repos.getBranch({
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              branch: branch
+            });
+            const currentSha = branchData.commit.sha;
+
+            // Compare SHA from last nightly against current
+            // if it is same, then no need to run nightly for the same SHA 
again.
+            const { data: runsData } = await 
github.rest.actions.listWorkflowRuns({

Review Comment:
   this probably makes sense
   initially I thought to skip it anyway, however on the other side it might 
help with flaky tests
   added such condition as well



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to