[GH-ISSUE #1332] act not listing workflows when using: "on: pull_request:" #718

Closed
opened 2026-03-01 21:45:47 +03:00 by kerem · 0 comments
Owner

Originally created by @ronaldoafonsoncsa on GitHub (Sep 6, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1332

Bug report info

act version:            0.2.31
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
	/var/run/docker.sock
Config files:           
	/home/ronaldo/.actrc:
		-P ubuntu-latest=catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.18.5
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:         
	Build settings:
		-compiler:            gc
		-ldflags:             -s -w -X main.version=0.2.31 -X main.commit=a20b1d4669d8d032fe35347bd3cfdae58b4d1d97 -X main.date=2022-09-01T02:56:14Z -X main.builtBy=goreleaser
		CGO_ENABLED:          0
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
		vcs:                  git
		vcs.revision:         a20b1d4669d8d032fe35347bd3cfdae58b4d1d97
		vcs.time:             2022-08-31T18:41:56Z
		vcs.modified:         false
Docker Engine:
	Engine version:        20.10.17
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Debian GNU/Linux 11 (bullseye)
	OS type:               linux
	OS version:            11
	OS arch:               x86_64
	OS kernel:             5.10.0-17-amd64
	OS CPU:                8
	OS memory:             15692 MB
	Security options:
		name=apparmor
		name=seccomp,profile=default
		name=cgroupns

Command used with act

act -l
Stage  Job ID  Job name  Workflow name  Workflow file  Events

Describe issue

I just created this workflow:

cat .github/workflows/pull_request.yml 
---
name: Pull Request Event

on:
  pull_request:

jobs:
  pullrequestit:
    runs-on: ubuntu-latest
    steps:
      - name: Pull Request it
        run: echo "Doing a pull request."
...

So when I run cat -l it is NOT listing my workflow.

act -l 
Stage  Job ID  Job name  Workflow name  Workflow file  Events

If I change the on: pull_request: to on: push:, it lists my workflow.

cat .github/workflows/pull_request.yml 
---
name: Pull Request Event

on:
  push:  ### NOW THERE IS A PUSH HERE

jobs:
  pullrequestit:
    runs-on: ubuntu-latest
    steps:
      - name: Pull Request it
        run: echo "Doing a pull request."
...
act -l
Stage  Job ID         Job name       Workflow name       Workflow file     Events
0      pullrequestit  pullrequestit  Pull Request Event  pull_request.yml  push 

I was expecting that act -l listing my workflow when I set the on: directive as pull_request.

No response

Workflow content

---
name: Pull Request Event

on:
  pull_request:

jobs:
  pullrequestit:
    runs-on: ubuntu-latest
    steps:
      - name: Pull Request it
        run: echo "Doing a pull request."
...

Relevant log output

act -l
Stage  Job ID  Job name  Workflow name  Workflow file  Events

Additional information

act doesn't list my workflow even if I set the on as:

on: [pull_request]

But it lists my workflow if I set two events push and pull_request, as:

on:
  push:
  pull_request:
Originally created by @ronaldoafonsoncsa on GitHub (Sep 6, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1332 ### Bug report info ```plain text act version: 0.2.31 GOOS: linux GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/ronaldo/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.18.5 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -compiler: gc -ldflags: -s -w -X main.version=0.2.31 -X main.commit=a20b1d4669d8d032fe35347bd3cfdae58b4d1d97 -X main.date=2022-09-01T02:56:14Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: a20b1d4669d8d032fe35347bd3cfdae58b4d1d97 vcs.time: 2022-08-31T18:41:56Z vcs.modified: false Docker Engine: Engine version: 20.10.17 Engine runtime: runc Cgroup version: 2 Cgroup driver: systemd Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Debian GNU/Linux 11 (bullseye) OS type: linux OS version: 11 OS arch: x86_64 OS kernel: 5.10.0-17-amd64 OS CPU: 8 OS memory: 15692 MB Security options: name=apparmor name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act -l Stage Job ID Job name Workflow name Workflow file Events ``` ### Describe issue I just created this workflow: ``` cat .github/workflows/pull_request.yml --- name: Pull Request Event on: pull_request: jobs: pullrequestit: runs-on: ubuntu-latest steps: - name: Pull Request it run: echo "Doing a pull request." ... ``` So when I run `cat -l` it is NOT listing my workflow. ``` act -l Stage Job ID Job name Workflow name Workflow file Events ``` If I change the `on: pull_request:` to `on: push:`, it lists my workflow. ``` cat .github/workflows/pull_request.yml --- name: Pull Request Event on: push: ### NOW THERE IS A PUSH HERE jobs: pullrequestit: runs-on: ubuntu-latest steps: - name: Pull Request it run: echo "Doing a pull request." ... act -l Stage Job ID Job name Workflow name Workflow file Events 0 pullrequestit pullrequestit Pull Request Event pull_request.yml push ``` I was expecting that `act -l` listing my workflow when I set the `on:` directive as `pull_request`. ### Link to GitHub repository _No response_ ### Workflow content ```yml --- name: Pull Request Event on: pull_request: jobs: pullrequestit: runs-on: ubuntu-latest steps: - name: Pull Request it run: echo "Doing a pull request." ... ``` ### Relevant log output ```sh act -l Stage Job ID Job name Workflow name Workflow file Events ``` ### Additional information `act` doesn't list my workflow even if I set the `on` as: ``` on: [pull_request] ``` But it lists my workflow if I set two events `push` and `pull_request`, as: ``` on: push: pull_request: ```
kerem 2026-03-01 21:45:47 +03:00
  • closed this issue
  • added the
    kind/bug
    label
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#718
No description provided.