This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 910924653bb component-test - Set the run id
910924653bb is described below
commit 910924653bb42fdf690ea58d8130f1571ceb2944
Author: Nicolas Filotto <[email protected]>
AuthorDate: Wed May 31 11:10:22 2023 +0200
component-test - Set the run id
---
.github/actions/component-test/action.yaml | 8 ++++----
.github/workflows/pr-comment.yml | 6 +-----
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/.github/actions/component-test/action.yaml
b/.github/actions/component-test/action.yaml
index c3262b0a01c..8478f6b9b82 100644
--- a/.github/actions/component-test/action.yaml
+++ b/.github/actions/component-test/action.yaml
@@ -21,6 +21,9 @@ inputs:
github-token:
description: 'GitHub token to use to update the comment'
required: true
+ run-id:
+ description: 'Id of the job'
+ required: true
pr-id:
description: 'Id of the pull request to update'
required: true
@@ -73,13 +76,10 @@ runs:
with:
github-token: ${{ inputs.github-token }}
script: |
- console.log(context)
- console.log(toJson(context))
- console.log(toJson(github))
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
- run_id: ${{ github.event.workflow_run.id }}
+ run_id: ${{ inputs.run-id }}
});
var message = `${{ inputs.comment-body }}
**Result** :x: The tests failed please check the logs below:
diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml
index dba47320010..79e70cf2ba4 100644
--- a/.github/workflows/pr-comment.yml
+++ b/.github/workflows/pr-comment.yml
@@ -54,16 +54,12 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- - name: Dump GitHub context
- env:
- GITHUB_CONTEXT: ${{ toJson(github) }}
- run: |
- echo "$GITHUB_CONTEXT"
- id: test
name: Component test execution
uses: ./.github/actions/component-test
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
+ run-id: ${{ github.run_id }}
pr-id: ${{ github.event.issue.number.id }}
comment-id: ${{ github.event.comment.id }}
comment-body: ${{ github.event.comment.body }}