continuous deployment – Trouble trying to run queued Github Actions

continuous deployment – Trouble trying to run queued Github Actions

I see here the following solutions:

  1. You can sleep your dependant workflow to simulate a waiting for
    1st workflow. wait-action might help
    you with that.
  2. You can try to trigger second action from the first action (instead of trigger it on
    push).

But all these options tbh are more like hacks. GitHub Actions are designed to run in parallel and if you want to run actions in specific order you should consider to use jobs instead and use needs property to make a dependency between them. Example:

jobs:
  job1:
    name: Run 1st job
  job2:
    name: Run 2nd job
    needs: job1

Documentation – needs

You can use concurrency.

name: CI

on:
  pull_request:
    branches: [main]

concurrency: ci

jobs:

Documentation

continuous deployment – Trouble trying to run queued Github Actions

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *