Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/austenstone/job-id
Get the GitHub Actions job id as job_id
https://github.com/austenstone/job-id
actions github-actions
Last synced: 15 days ago
JSON representation
Get the GitHub Actions job id as job_id
- Host: GitHub
- URL: https://github.com/austenstone/job-id
- Owner: austenstone
- License: mit
- Created: 2024-05-07T22:17:57.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-05-08T14:48:29.000Z (6 months ago)
- Last Synced: 2024-10-10T21:17:29.525Z (about 1 month ago)
- Topics: actions, github-actions
- Homepage:
- Size: 438 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Get Job ID Action
GitHub doesn't provide the job id anywhere so here's a simple action to get the job id for the current job.
## Usage
Calling the action in the job you want to get the job id for. Provide an ID for the step so you can reference the output.
#### Example
```yml
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: austenstone/job-id@v1
id: job-id
- run: echo $GITHUB_JOB_ID
env:
GITHUB_JOB_ID: ${{ steps.job-id.outputs.job-id }}
```## ➡️ Inputs
Various inputs are defined in [`action.yml`](action.yml):| Name | Description | Default |
| --- | - | - |
| github‑token | Token to use to authorize. | ${{ github.token }} |## ⬅️ Outputs
| Name | Description |
| --- | - |
| job-id | The job id for the current job. |## Further help
To get more help on the Actions see [documentation](https://docs.github.com/en/actions).