Skip to content
This repository has been archived by the owner on May 15, 2021. It is now read-only.

technote-space/auto-cancel-redundant-workflow

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Auto Cancel Redundant Workflow


Please note: This repository is no longer maintained.
Please use the concurrency provided by the officials instead.

Example of migration

on: push
jobs:
  test:
    steps:
      - uses: technote-space/auto-cancel-redundant-workflow@v1
      - run: echo step1
      - run: echo step2
      # ...

on: push
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
#  cancel-in-progress: true
jobs:
  test:
    steps:
      - run: echo step1
      - run: echo step2
      # ...

CI Status codecov CodeFactor License: MIT

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

GitHub Actions to automatically cancel redundant workflow.

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-workflow@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 workflow

cancelled

Result

result

Outputs

name description e.g.
ids Run IDs of the cancelled workflow. 1234,2345

Author

GitHub (Technote)
Blog

About

GitHub Actions to automatically cancel redundant workflow.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages