GitHub Action
GitHub Actions job_id parser
GitHub Action to get the current workflow run's job_id
This GitHub Action depends on the GitHub REST API v3.
https://developer.github.com/v3/actions/workflow_jobs/
Required GITHUB_TOKEN to use GitHub API v3
Required job_name of tartget workflow jobs
target GitHub repository
default: ${GITHUB_REPOSITORY}
run_id of target workflow run
default: ${GITHUB_RUN_ID}
Results per page (max 100) of target workflow run
default: 30
https://docs.github.com/en/rest/reference/actions#list-jobs-for-a-workflow-run-attempt
If there are more than 30 jobs for the target workflow, set this parameter.
job_id of target workflow jobs
html_url of target workflow jobs
The job using this GitHub Actions must have the actions:read
permission.
- name: Get Current Job Log URL
uses: Tiryoh/gha-jobid-action@v0
id: jobs
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
job_name: @@JOB_NAME@@
per_page: 30
- name: Output Current Job Log URL
run: echo ${{ steps.jobs.outputs.html_url }}
Special Thanks
- @IngoStrauch2020
- Petr Pučil (@generalmimon)
- Masaya Suzuki (@massongit)
Contributions are always welcome!
Copyright (c) 2020-2022 Daisuke Sato
This repository is licensed under the MIT License, see LICENSE.
Unless attributed otherwise, everything in this repository is licensed under the MIT license.