8000 GitHub - jsok/serialize-workflow-action: A GitHub Action to serialize workflow runs
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jsok/serialize-workflow-action

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Serialize Workflow action

A GitHub Action to serialize workflow runs.

This action will poll the currently queued and in_progress workflow runs. If there are one or more workflow runs whose run number is less than the current run number, the actions will wait.

Requires bash, gh and jq, which should be all present on a GitHub hosted runner.

Motivation

Implementing serialized workflow runs is not possible using concurrency since it will cancel any previously pending run as new runs are queued. Sometimes you wish to run every queued workflow run, rather than just the most recently queued one.

Billing

Since this action is polling, a workflow run will be billed even if it is waiting for its turn to run. This may be expensive if you have many or long running jobs.

Inputs

github-token

A GitHub access token to perform API calls. It must have the following permissions:

  • actions: read

workflow

Optional: The workflow ID or filename, if omitted will use the currently running workflow.

run

Optional: The workflow run number, defaults to the current run number.

Outputs

Presently, none.

Example usage

jobs:
  main:
    runs-on: ubuntu-latest
    permissions:
      actions: read
    timeout-minutes: 10  # recommended that you set an overall job timeout
    steps:
    - uses: jsok/serialize-workflow-action@v1
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}

About

A GitHub Action to serialize workflow runs

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0