/auto-cancel-redundant-job

GitHub Actions to automatically cancel redundant jobs.

Primary LanguageTypeScriptMIT LicenseMIT

Auto Cancel Redundant Job

CI Status codecov CodeFactor License: MIT

Read this in other languages: English, 日本語.

GitHub Actions to automatically cancel redundant jobs.

Table of Contents

Details

Usage

on:
  repository_dispatch:
    types: [test]
  # push:
  # ...

name: Example
jobs:
  firstJob:
    name: First Job
    runs-on: ubuntu-latest
    steps:
        # Use this GitHub Actions at least once in this workflow as soon as possible.
      - uses: technote-space/auto-cancel-redundant-job@v1
        # Run any steps
      - name: any steps
        run: echo test
      # ...

  # Run any jobs
  secondJob:
    name: Second Job
    needs: firstJob
    runs-on: ubuntu-latest
    steps:
      - run: echo test

  # ...

e.g.

Screenshots

Cancelling jobs

cancelling

Cancelled job

cancelled

Result

result

Outputs

name description e.g.
ids The results of cancelled run ids. 1234,2345

Author

GitHub (Technote)
Blog