Skip to content

ydataai/consecutive-workflow-action

 
 

Repository files navigation

Consecutive Workflow Action

Make workflow runs run consecutively.

Create a comment here and delete it immediately and then go to the Actions tab to see how the second workflow run waits for the previous one.

Usage

jobs:
  consecutiveness:
    runs-on: ubuntu-latest
    steps:
    - uses: mktcode/consecutive-workflow-action@v1
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

  # your other jobs
  something:
    runs-on: ubuntu-latest
    needs: [ consecutiveness ]
    steps:
    # ...

Security Note:

The token is needed to avoid rate limitation issues when performing API calls. I was thinking about making that optional but decided to just make you aware of the security risk and how to avoid it.

Please read this section in the docs before using some random action that asks for your secrets.

There is a v1 branch and tag for this action and you can simply decide to trust me. I recommend using a commit hash instead though.

- uses: mktcode/consecutive-workflow-action@cb3605cc3ab767c170434b0cfb6b522d193b7d57

Review the repo at this commit.

Alternatives

I also found these actions, which might better suit your needs:

Their purpose is slightly different. You can wait for certain checks to pass and therefore you can specify a certain ref and you can wait for runs of different workflows.

My action does only one thing: It forces runs of the same workflow to run in consecutive order.

I needed this because I let my workflows push to the repo a lot, which fails when one run pushes in between checkout and push in another run.

About

Make workflow runs run consecutively.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%