[GH-ISSUE #625] Issue: a strategy clause without matrix 'disables' a job #411

Closed
opened 2026-03-01 21:43:07 +03:00 by kerem · 2 comments
Owner

Originally created by @Totktonada on GitHub (Apr 19, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/625

Originally assigned to: @catthehacker on GitHub.

Act version

$ ~/go/bin/act --version
Error: unknown flag: --version
$ strings ~/go/bin/act | grep '^mod.*v[0-9]\+\.[0-9]\+\.[0-9]\+'
mod	github.com/nektos/act	v0.2.21	h1:mx5wheBRwuwrCaZb+gL0QcxIQQCsUFKtafmamfqtfWU=

I'm on Gentoo Linux (if it matters).

Expected behaviour

The job below is run when I type ~/go/bin/act (it is run on GitHub Actions).

Actual behaviour

The job below does not run when I type ~/go/bin/act.

Workflow

workflow
name: Hello, world!

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
    steps:
      - uses: actions/checkout@v2
      - name: Run a script
        run: echo Hello, world!

Steps to reproduce

  1. Create an empty git repository.
  2. Place the workflow above into the .github/workflows/hello_world.yml file.
  3. Run ~/go/bin/act.

act output

Log
$ ~/go/bin/act --verbose
DEBU[0000] Loading environment from /home/alex/p/p/test/.env 
DEBU[0000] Loading secrets from /home/alex/p/p/test/.secrets 
DEBU[0000] Loading workflows from '/home/alex/p/p/test/.github/workflows' 
DEBU[0000] Reading workflow '/home/alex/p/p/test/.github/workflows/hello_world.yml' 
DEBU[0000] Planning event: push 

Looking a bit deeper

When I remove the strategy clause the job is run:

workflow (without strategy clause)
name: Hello, world!

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Run a script
        run: echo Hello, world!

Or, when I add `matrix clause, the job is run too:

workflow (with matrix clause)
name: Hello, world!

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        runs-on: [ubuntu-latest]
    steps:
      - uses: actions/checkout@v2
      - name: Run a script
        run: echo Hello, world!
Originally created by @Totktonada on GitHub (Apr 19, 2021). Original GitHub issue: https://github.com/nektos/act/issues/625 Originally assigned to: @catthehacker on GitHub. ## Act version ```none $ ~/go/bin/act --version Error: unknown flag: --version $ strings ~/go/bin/act | grep '^mod.*v[0-9]\+\.[0-9]\+\.[0-9]\+' mod github.com/nektos/act v0.2.21 h1:mx5wheBRwuwrCaZb+gL0QcxIQQCsUFKtafmamfqtfWU= ``` I'm on Gentoo Linux (if it matters). ## Expected behaviour The job below is run when I type `~/go/bin/act` (it is run on GitHub Actions). ## Actual behaviour The job below does not run when I type `~/go/bin/act`. ## Workflow <details> <summary>workflow</summary> ```yaml name: Hello, world! on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false steps: - uses: actions/checkout@v2 - name: Run a script run: echo Hello, world! ``` </details> ## Steps to reproduce 1. Create an empty git repository. 2. Place the workflow above into the `.github/workflows/hello_world.yml` file. 3. Run `~/go/bin/act`. ## `act` output <details> <summary>Log</summary> ```none $ ~/go/bin/act --verbose DEBU[0000] Loading environment from /home/alex/p/p/test/.env DEBU[0000] Loading secrets from /home/alex/p/p/test/.secrets DEBU[0000] Loading workflows from '/home/alex/p/p/test/.github/workflows' DEBU[0000] Reading workflow '/home/alex/p/p/test/.github/workflows/hello_world.yml' DEBU[0000] Planning event: push ``` </details> ## Looking a bit deeper When I remove the `strategy` clause the job is run: <details> <summary>workflow (without strategy clause)</summary> ```yaml name: Hello, world! on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Run a script run: echo Hello, world! ``` </details> Or, when I add `matrix clause, the job is run too: <details> <summary>workflow (with matrix clause)</summary> ```yaml name: Hello, world! on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: fail-fast: false matrix: runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v2 - name: Run a script run: echo Hello, world! ``` </details>
Author
Owner

@Totktonada commented on GitHub (May 5, 2021):

Even just warning would be useful as the temporary solution: otherwise it is unclear what is going on.

<!-- gh-comment-id:832345816 --> @Totktonada commented on GitHub (May 5, 2021): Even just warning would be useful as the temporary solution: otherwise it is unclear what is going on.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 5, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:855152191 --> @github-actions[bot] commented on GitHub (Jun 5, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#411
No description provided.