Skip to content

Commit

Permalink
Use job id in comment as well
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan committed May 7, 2024
1 parent 84bf797 commit 9aaba6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/run-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Run script
shell: pwsh
run: |
$githubActionUrl = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}'
$githubActionUrl = '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ github.job }}'
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/json" https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --data "{`"body`":`"$githubActionUrl`""
$scriptId = ('${{ github.event.issue.body }}' -split '-')[2]
Invoke-WebRequest -Uri "https://mihubot.xyz/api/RunScript/?id=$scriptId" | Invoke-Expression
Expand Down

0 comments on commit 9aaba6b

Please sign in to comment.