• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Get workflow job id
2
3description: Get the ID of the workflow job that is currently running.
4
5inputs:
6  github-token:
7    description: GITHUB_TOKEN
8    required: true
9
10outputs:
11  job-id:
12    description: The retrieved workflow job id
13    value: ${{ steps.get-job-id.outputs.job-id }}
14  job-name:
15    description: The retrieved workflow job name
16    value: ${{ steps.get-job-id.outputs.job-name }}
17
18runs:
19  using: composite
20  steps:
21    - name: Get job id and name or fail
22      # timeout-minutes is unsupported for composite workflows, see https://github.com/actions/runner/issues/1979
23      # timeout-minutes: 10
24      shell: bash
25      id: get-job-id
26      run: |
27        set -eux
28        python3 .github/scripts/get_workflow_job_id.py "${GITHUB_RUN_ID}" "${RUNNER_NAME}"
29      env:
30        GITHUB_TOKEN: ${{ inputs.github-token }}
31