Skip to content
Discussion options

You must be logged in to vote

Yes, you can use the Check Runs API to identify Workflow runs for a ref. As luck would have it, someone has already built a comprehensive Action for this use-case: fkirc/skip-duplicate-actions.

  1. Add a new “pre” job to your Workflow, this job uses fkirc/skip-duplicate-actions to determine if your main job should be skipped
  2. Add a condition to your main job using the should_skip output of the “pre” job.

For example, adapted from the fkirc/skip-duplicate-actions readme:

jobs:
  pre_job:
    runs-on: ubuntu-latest
    outputs:
      should_skip: ${{ steps.skip_check.outputs.should_skip }}
    steps:
      - id: skip_check
        uses: fkirc/skip-duplicate-actions@v3.4.0
        with:
       …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jsoref
Comment options

@kmturley
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product Feedback Share your thoughts and suggestions on GitHub features and improvements
4 participants