[GH-ISSUE #2144] Succeeds with yaml streams while github actions fail #1025

Closed
opened 2026-03-01 21:48:18 +03:00 by kerem · 1 comment
Owner

Originally created by @chrismgrayftsinc on GitHub (Jan 3, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2144

Bug report info

act version:            0.2.55
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 8
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
Config files:           
	/home/cmg/.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.20.11
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:         
	Build settings:
		-buildmode:           exe
		-compiler:            gc
		-trimpath:            true
		CGO_ENABLED:          0
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
		vcs:                  git
		vcs.revision:         e8856f0fb00fcdd16eef2325b845f55f5d346f51
		vcs.time:             2023-08-21T16:17:06Z
		vcs.modified:         true
Docker Engine:
	Engine version:        24.0.6
	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-22-amd64
	OS CPU:                8
	OS memory:             31979 MB
	Security options:
		name=apparmor
		name=seccomp,profile=builtin
		name=cgroupns

Command used with act

gh act "pull_request" --secret-file .secret

Describe issue

act should fail on the provided workflow, since github-actions does.

The error message from github-actions is The workflow is not valid. .github/workflows/github-actions.yml: Expected stream end parse event

No response

Workflow content

---
jobs:
  pull_request:
    runs-on: ubuntu-latest
    steps:
      - name: clone
        uses: actions/checkout@v2
name: pull_request
"on":
  pull_request:
    types:
      - opened
      - synchronize
---
jobs:
  deploy-to-staging:
    runs-on: ubuntu-latest
    steps:
      - name: clone
        uses: actions/checkout@v2
name: Deploy to Staging
"on":
  push:
    branches:
      - release/*
      - hotfix/*

Relevant log output

[pull_request/pull_request] 🚀  Start image=catthehacker/ubuntu:act-latest
INFO[0000] Parallel tasks (0) below minimum, setting to 1 
[pull_request/pull_request]   🐳  docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true
INFO[0069] Parallel tasks (0) below minimum, setting to 1 
[pull_request/pull_request]   🐳  docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[pull_request/pull_request]   🐳  docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host"
[pull_request/pull_request] ⭐ Run Main clone
[pull_request/pull_request]   🐳  docker cp src=/home/cmg/IdeaProjects/cameras-service-360/. dst=/home/cmg/IdeaProjects/cameras-service-360
[pull_request/pull_request]   ✅  Success - Main clone
[pull_request/pull_request] Cleaning up container for job pull_request
[pull_request/pull_request] 🏁  Job succeeded

Additional information

When I split the one workflow file into two yaml files, github-actions did work as expected.

Originally created by @chrismgrayftsinc on GitHub (Jan 3, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2144 ### Bug report info ```plain text act version: 0.2.55 GOOS: linux GOARCH: amd64 NumCPU: 8 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: /home/cmg/.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.20.11 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -trimpath: true CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: e8856f0fb00fcdd16eef2325b845f55f5d346f51 vcs.time: 2023-08-21T16:17:06Z vcs.modified: true Docker Engine: Engine version: 24.0.6 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-22-amd64 OS CPU: 8 OS memory: 31979 MB Security options: name=apparmor name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh gh act "pull_request" --secret-file .secret ``` ### Describe issue `act` should fail on the provided workflow, since github-actions does. The error message from github-actions is `The workflow is not valid. .github/workflows/github-actions.yml: Expected stream end parse event` ### Link to GitHub repository _No response_ ### Workflow content ```yml --- jobs: pull_request: runs-on: ubuntu-latest steps: - name: clone uses: actions/checkout@v2 name: pull_request "on": pull_request: types: - opened - synchronize --- jobs: deploy-to-staging: runs-on: ubuntu-latest steps: - name: clone uses: actions/checkout@v2 name: Deploy to Staging "on": push: branches: - release/* - hotfix/* ``` ### Relevant log output ```sh [pull_request/pull_request] 🚀 Start image=catthehacker/ubuntu:act-latest INFO[0000] Parallel tasks (0) below minimum, setting to 1 [pull_request/pull_request] 🐳 docker pull image=catthehacker/ubuntu:act-latest platform= username= forcePull=true INFO[0069] Parallel tasks (0) below minimum, setting to 1 [pull_request/pull_request] 🐳 docker create image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host" [pull_request/pull_request] 🐳 docker run image=catthehacker/ubuntu:act-latest platform= entrypoint=["tail" "-f" "/dev/null"] cmd=[] network="host" [pull_request/pull_request] ⭐ Run Main clone [pull_request/pull_request] 🐳 docker cp src=/home/cmg/IdeaProjects/cameras-service-360/. dst=/home/cmg/IdeaProjects/cameras-service-360 [pull_request/pull_request] ✅ Success - Main clone [pull_request/pull_request] Cleaning up container for job pull_request [pull_request/pull_request] 🏁 Job succeeded ``` ### Additional information When I split the one workflow file into two yaml files, github-actions did work as expected.
kerem 2026-03-01 21:48:18 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jul 2, 2024):

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

<!-- gh-comment-id:2201502897 --> @github-actions[bot] commented on GitHub (Jul 2, 2024): 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#1025
No description provided.