[GH-ISSUE #1241] eventpath now working #683

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

Originally created by @teacherSsamko on GitHub (Jul 5, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1241

Bug report info

act version:            0.2.26
GOOS:                   darwin
GOARCH:                 arm64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
	/var/run/docker.sock
Config files:           
	/Users/eunsub/.actrc:
		-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
		-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
Docker Engine:
	Engine version:        20.10.14
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         cgroupfs
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Docker Desktop
	OS type:               linux
	OS version:            
	OS arch:               aarch64
	OS kernel:             5.10.104-linuxkit
	OS CPU:                4
	OS memory:             7851 MB
	Security options:
		name=seccomp,profile=default
		name=cgroupns

Command used with act

act --eventpath pr_lox.json --secret-file .secrets

Describe issue

I used sample json in README for pr_lox.json

{
    "pull_request": {
      "head": {
        "ref": "sample-head-ref"
      },
      "base": {
        "ref": "sample-base-ref"
      }
    }
}

But it still acts like push.
my workflow.yml written like below

...
on:
  push:
    branches:
      - 'lox/**'
    paths:
      - .github/workflows/lox.yml
      - lox/**
    tags:
      - lox-*
...

What did I miss? or is it a bug?

No response

Workflow content

name: lox

env:
  DOCKER_BUILDKIT: 1
  COMPOSE_DOCKER_CLI_BUILD: 1

on:
  push:
    branches:
      - 'lox/**'
    paths:
      - .github/workflows/lox.yml
      - lox/**
    tags:
      - lox-*

jobs:
  build:
    # if: startsWith(github.ref, 'refs/tags/lox-')
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

Relevant log output

[lox/build  ] Extracting content from '/var/folders/9x/jf14h4hx403_dkn80cjqh8500000gn/T/act3328915356' to '/Users/E**/Dev/c*'
DEBU[0002] FIXME: Got an status-code for which error does not match any expected type!!!: -1  module=api status_code=-1
DEBU[0002] FIXME: Got an status-code for which error does not match any expected type!!!: -1  module=api status_code=-1
DEBU[0002] Loading slug from git directory '/Users/E**/Dev/c*/.git' 
DEBU[0002] Loading revision from git directory '/Users/E**/Dev/c*/.git' 
DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 
DEBU[0002] HEAD points to '625c0184778100544ff7ba98622b35536cbc0e13' 
DEBU[0002] Loading slug from git directory '/Users/E**/Dev/c*/.git' 
DEBU[0002] Loading revision from git directory '/Users/E**/Dev/c*/.git' 
DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 
DEBU[0002] HEAD points to '625c0184778100544ff7ba98622b35536cbc0e13' 
DEBU[0002] using github ref: refs/heads/501-CD-pipeline 
DEBU[0002] using github ref: refs/heads/501-CD-pipeline 
DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 
DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 
Error: context canceled

Additional information

No response

Originally created by @teacherSsamko on GitHub (Jul 5, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1241 ### Bug report info ```plain text act version: 0.2.26 GOOS: darwin GOARCH: arm64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /Users/eunsub/.actrc: -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 Docker Engine: Engine version: 20.10.14 Engine runtime: runc Cgroup version: 2 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: aarch64 OS kernel: 5.10.104-linuxkit OS CPU: 4 OS memory: 7851 MB Security options: name=seccomp,profile=default name=cgroupns ``` ### Command used with act ```sh act --eventpath pr_lox.json --secret-file .secrets ``` ### Describe issue I used sample json in README for `pr_lox.json` ```json { "pull_request": { "head": { "ref": "sample-head-ref" }, "base": { "ref": "sample-base-ref" } } } ``` But it still acts like `push`. my `workflow.yml` written like below ```yaml ... on: push: branches: - 'lox/**' paths: - .github/workflows/lox.yml - lox/** tags: - lox-* ... ``` What did I miss? or is it a bug? ### Link to GitHub repository _No response_ ### Workflow content ```yml name: lox env: DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 on: push: branches: - 'lox/**' paths: - .github/workflows/lox.yml - lox/** tags: - lox-* jobs: build: # if: startsWith(github.ref, 'refs/tags/lox-') runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 ``` ### Relevant log output ```sh [lox/build ] Extracting content from '/var/folders/9x/jf14h4hx403_dkn80cjqh8500000gn/T/act3328915356' to '/Users/E**/Dev/c*' DEBU[0002] FIXME: Got an status-code for which error does not match any expected type!!!: -1 module=api status_code=-1 DEBU[0002] FIXME: Got an status-code for which error does not match any expected type!!!: -1 module=api status_code=-1 DEBU[0002] Loading slug from git directory '/Users/E**/Dev/c*/.git' DEBU[0002] Loading revision from git directory '/Users/E**/Dev/c*/.git' DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 DEBU[0002] HEAD points to '625c0184778100544ff7ba98622b35536cbc0e13' DEBU[0002] Loading slug from git directory '/Users/E**/Dev/c*/.git' DEBU[0002] Loading revision from git directory '/Users/E**/Dev/c*/.git' DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 DEBU[0002] HEAD points to '625c0184778100544ff7ba98622b35536cbc0e13' DEBU[0002] using github ref: refs/heads/501-CD-pipeline DEBU[0002] using github ref: refs/heads/501-CD-pipeline DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 DEBU[0002] Found revision: 625c0184778100544ff7ba98622b35536cbc0e13 Error: context canceled ``` ### Additional information _No response_
kerem 2026-03-01 21:45:29 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@KnisterPeter commented on GitHub (Jul 5, 2022):

If you run act with -h, you can see that you need to define the event. If you don't define it, it is push.

<!-- gh-comment-id:1174908211 --> @KnisterPeter commented on GitHub (Jul 5, 2022): If you run act with -h, you can see that you need to define the event. If you don't define it, it is push.
Author
Owner

@teacherSsamko commented on GitHub (Jul 5, 2022):

Oh.. then the event file should be used with push or pull-request. got it. I thought it would act as the event file. Thank you for your quick response

<!-- gh-comment-id:1174932284 --> @teacherSsamko commented on GitHub (Jul 5, 2022): Oh.. then the event file should be used with `push` or `pull-request`. got it. I thought it would act as the event file. Thank you for your quick response
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#683
No description provided.