Skip to content

Commit

Permalink
Try this out
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Jan 10, 2025
1 parent 7967ce1 commit 797de85
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,19 @@ jobs:
comment-author: 'github-actions[bot]'
body-includes: Markdown linter

- name: Get Job ID from GH API
id: get-job-id
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
jobs=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id}}/attempts/${{ github.run_attempt }}/jobs)
job_id=$(echo $jobs | jq -r '.jobs[] | select(.runner_name=="${{ runner.name }}") | .id')
echo "job_id=$job_id" >> $GITHUB_OUTPUT
- name: Build components of the comment
id: build-components
run: |
report_link=$(echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}")
report_link=$(echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ steps.get-job-id.outputs.job_id }}")
echo "time=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
echo "commit_id=$GITHUB_SHA" >> $GITHUB_OUTPUT
echo ${{steps.commit.outputs.markdown_issues}}
Expand Down

0 comments on commit 797de85

Please sign in to comment.