yihua commented on code in PR #10731:
URL: https://github.com/apache/hudi/pull/10731#discussion_r1500030803


##########
.github/workflows/azure_ci_check.yml:
##########
@@ -0,0 +1,74 @@
+name: Azure CI
+
+on:
+  pull_request:
+    types: [ opened, reopened, synchronize, edited ]
+  issue_comment:
+    types: [ created, edited ]
+
+jobs:
+  check-azure-ci-report:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v2
+
+      - name: Get last commit hash
+        id: last_commit
+        uses: actions/github-script@v5
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          script: |
+            const pr = context.payload.pull_request;
+            const lastCommitHash = pr.head.sha;
+            console.log(`Last commit hash: ${lastCommitHash}`);
+            // Set the output variable to be used in subsequent step
+            core.setOutput("last_commit_hash", lastCommitHash);
+
+      - name: Check Azure CI report in PR comment
+        uses: actions/github-script@v5
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          script: |
+            const lastCommitHash = '${{ 
steps.last_commit.outputs.last_commit_hash }}'

Review Comment:
   Actually GitHub docs suggest this pattern with spaces before and after the 
variable: 
https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows



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