githubgithub-actions

github actions get URL of test build


I can't seem to find out how to get the URL of a test workflow anywhere in the docs. I have a simple job which runs tests and on fail it needs to post the URL of the failed job to another web service.

I was expecting this to be in the default env vars but apparently not.

Thanks,


Solution

  • Here's how you construct the URL:

    ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}