Skip to content

Wait for Job

Actions
Wait for a specific GitHub Actions workflow job to complete. Can be useful for synchronization between separate workflows
v1.0.0
Latest
Star (0)

Tags

 (1)

Wait for Job

Wait for a specific GitHub Actions workflow job to complete. Can be useful for synchronization between separate workflows.

This action can be used to wait for jobs within the same workflow but users should typically rely on the built-in GitHub Actions jobs.*.needs functionality for this purpose.

Example

---
jobs:
  example:
    # These permissions are needed to:
    # - Get the workflow run: https://github.com/beacon-biosignals/get-workflow-run#permissions
    # - Wait for the workflow job: https://github.com/beacon-biosignals/wait-for-job#permissions
    runs-on: ubuntu-latest
    steps:
      - uses: beacon-biosignals/get-workflow-run@v1
        id: workflow-run
        with:
          workflow-file: build.yaml
          commit-sha: ${{ github.event.pull_request.head.sha }}
      - uses: beacon-biosignals/wait-for-job@v1
        id: wait-for-job
        with:
          run-id: ${{ steps.workfow-run.outputs.run-id }}
          job-name: Build
      # Now interact with shared resource created or modified the the job

Inputs

Name Description Required Example
run-id The workflow run containing the job to wait for. Yes 9035794515
job-name The rendered workflow job name to wait for. Yes Build
timeout The maximum amount of seconds to wait for the workflow job. Defaults to 600 (10 minutes). No 300
poll-interval Number of seconds between job status checks. Defaults to 15. No 5
repository The repository runing the workflow. Defaults to ${{ github.repository }}. No beacon-biosignals/wait-for-job
token The GitHub token used to authenticate with the GitHub API. Need when attempting to access artifacts in a different repository. Defaults to ${{ github.token }}. No ${{ secret.PAT }}

Outputs

Name Description Example
job-id The job ID of the job which was waited upon. 35737668081
conclusion The result of the completed job after continue-on-error is applied. Possible values are success, failure, cancelled, or skipped. success

Permissions

The following job permissions are required to run this action:

permissions:
  actions: read

Wait for Job is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Wait for a specific GitHub Actions workflow job to complete. Can be useful for synchronization between separate workflows
v1.0.0
Latest

Tags

 (1)

Wait for Job is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.