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


##########
.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:
   Unless the nightly previously failed I guess? Then I think we'd like to run 
it again? 



-- 
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