[GH-ISSUE #2466] Error: workflow is not valid #1138

Closed
opened 2026-03-01 21:49:12 +03:00 by kerem · 3 comments
Owner

Originally created by @Darkratos on GitHub (Sep 19, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2466

Bug report info

act version:            0.2.67
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 12
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
Build info:
        Go version:            go1.21.13
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.67 -X main.commit=f75a2d8b38cc3b929ab652c0994d6d33f6584ed9 -X main.date=2024-09-10T18:17:24Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         f75a2d8b38cc3b929ab652c0994d6d33f6584ed9
                vcs.time:             2024-09-10T18:17:07Z
                vcs.modified:         false
Docker Engine:
        Engine version:        27.0.3
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.15.153.1-microsoft-standard-WSL2
        OS CPU:                12
        OS memory:             11897 MB
        Security options:
                name=seccomp,profile=unconfined

Command used with act

act -W .github\workflows\docker-image.yml

Describe issue

It says workflow is not valid. It works when running from Github Actions.

https://github.com/wavoip/chatwoot

Workflow content

# #
# # This action will publish Chatwoot CE docker image.
# # This is set to run against merges to develop, master
# # and when tags are created.
# #

name: Publish Chatwoot CE docker images
on:
  push:
    branches:
      - main
    tags:
      - v*
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      GIT_REF: ${{ github.head_ref || github.ref_name }} # ref_name to get tags/branches
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
        with:
          platforms: all

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
        with:
          buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
          
      - name: Strip enterprise code
        run: |
          rm -rf enterprise
          rm -rf spec/enterprise

      - name: Set Chatwoot edition
        run: |
          echo -en '\nENV CW_EDITION="ce"' >> docker/Dockerfile

      - name: set docker tag
        run: |
          echo "DOCKER_TAG=wavoiprepo/wavoiprepo:$GIT_REF-ce" >> $GITHUB_ENV

      - name: replace docker tag if master
        if: github.ref_name == 'main'
        run: |
          echo "DOCKER_TAG=wavoiprepo/chatwoot:latest-multi-plataform" >> $GITHUB_ENV

      - name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ <redacted> }}
          password: ${{ <redacted> }}

      - name: Increase yarn network timeout and install dependencies
        run: |
          yarn config set network-timeout 9000000 -g
          
      - name: Build and push
        uses: docker/build-push-action@v2
        with:
          context: .
          file: docker/Dockerfile
          platforms: linux/amd64,linux/arm64
          push: true
          tags: ${{ env.DOCKER_TAG }}

Relevant log output

time="2024-09-19T15:58:25-03:00" level=info msg="Using docker host 'npipe:////./pipe/docker_engine', and daemon socket 'npipe:////./pipe/docker_engine'"
Error: workflow is not valid. 'docker-image.yml': Line: 18 Column 5: Failed to match job-factory: Line: 53 Column 9: Failed to match run-step: Line: 54 Column 9: Unknown Property uses
Line: 55 Column 9: Unknown Property with
Line: 53 Column 9: Failed to match regular-step: Line: 56 Column 21: Unknown Variable Access <redacted>
Line: 57 Column 21: Unknown Variable Access <redacted>
Line: 18 Column 5: Failed to match workflow-job: Line: 18 Column 5: Unknown Property runs-on
Line: 19 Column 5: Unknown Property env
Line: 21 Column 5: Unknown Property steps

Additional information

No response

Originally created by @Darkratos on GitHub (Sep 19, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2466 ### Bug report info ```plain text act version: 0.2.67 GOOS: windows GOARCH: amd64 NumCPU: 12 Docker host: DOCKER_HOST environment variable is not set Sockets found: \\.\pipe\docker_engine(broken) Config files: Build info: Go version: go1.21.13 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.67 -X main.commit=f75a2d8b38cc3b929ab652c0994d6d33f6584ed9 -X main.date=2024-09-10T18:17:24Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: windows GOAMD64: v1 vcs: git vcs.revision: f75a2d8b38cc3b929ab652c0994d6d33f6584ed9 vcs.time: 2024-09-10T18:17:07Z vcs.modified: false Docker Engine: Engine version: 27.0.3 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.15.153.1-microsoft-standard-WSL2 OS CPU: 12 OS memory: 11897 MB Security options: name=seccomp,profile=unconfined ``` ### Command used with act ```sh act -W .github\workflows\docker-image.yml ``` ### Describe issue It says workflow is not valid. It works when running from Github Actions. ### Link to GitHub repository https://github.com/wavoip/chatwoot ### Workflow content ```yml # # # # This action will publish Chatwoot CE docker image. # # This is set to run against merges to develop, master # # and when tags are created. # # name: Publish Chatwoot CE docker images on: push: branches: - main tags: - v* workflow_dispatch: jobs: build: runs-on: ubuntu-latest env: GIT_REF: ${{ github.head_ref || github.ref_name }} # ref_name to get tags/branches steps: - name: Checkout uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v1 with: platforms: all - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 with: buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host - name: Strip enterprise code run: | rm -rf enterprise rm -rf spec/enterprise - name: Set Chatwoot edition run: | echo -en '\nENV CW_EDITION="ce"' >> docker/Dockerfile - name: set docker tag run: | echo "DOCKER_TAG=wavoiprepo/wavoiprepo:$GIT_REF-ce" >> $GITHUB_ENV - name: replace docker tag if master if: github.ref_name == 'main' run: | echo "DOCKER_TAG=wavoiprepo/chatwoot:latest-multi-plataform" >> $GITHUB_ENV - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ <redacted> }} password: ${{ <redacted> }} - name: Increase yarn network timeout and install dependencies run: | yarn config set network-timeout 9000000 -g - name: Build and push uses: docker/build-push-action@v2 with: context: . file: docker/Dockerfile platforms: linux/amd64,linux/arm64 push: true tags: ${{ env.DOCKER_TAG }} ``` ### Relevant log output ```sh time="2024-09-19T15:58:25-03:00" level=info msg="Using docker host 'npipe:////./pipe/docker_engine', and daemon socket 'npipe:////./pipe/docker_engine'" Error: workflow is not valid. 'docker-image.yml': Line: 18 Column 5: Failed to match job-factory: Line: 53 Column 9: Failed to match run-step: Line: 54 Column 9: Unknown Property uses Line: 55 Column 9: Unknown Property with Line: 53 Column 9: Failed to match regular-step: Line: 56 Column 21: Unknown Variable Access <redacted> Line: 57 Column 21: Unknown Variable Access <redacted> Line: 18 Column 5: Failed to match workflow-job: Line: 18 Column 5: Unknown Property runs-on Line: 19 Column 5: Unknown Property env Line: 21 Column 5: Unknown Property steps ``` ### Additional information _No response_
kerem 2026-03-01 21:49:12 +03:00
Author
Owner

@ChristopherHX commented on GitHub (Sep 19, 2024):

Unable to reproduce

Original Workflow has no problems in act: https://github.com/wavoip/chatwoot/actions/runs/10913234450/workflow

Why did you even replace secrets.NAME by <redacted>? This make the workflow invalid for both act and GitHub Actions.

<!-- gh-comment-id:2362151997 --> @ChristopherHX commented on GitHub (Sep 19, 2024): Unable to reproduce Original Workflow has no problems in act: https://github.com/wavoip/chatwoot/actions/runs/10913234450/workflow Why did you even replace `secrets.NAME` by `<redacted>`? This make the workflow invalid for both act and GitHub Actions.
Author
Owner

@Darkratos commented on GitHub (Sep 19, 2024):

Unable to reproduce

Original Workflow has no problems in act: https://github.com/wavoip/chatwoot/actions/runs/10913234450/workflow

Why did you even replace secrets.NAME by <redacted>? This make the workflow invalid for both act and GitHub Actions.

I redacted in the post, not on the code. Locally I just replaced by my actual credentials. I did not realize this would actually access the repository's variables.

<!-- gh-comment-id:2362226286 --> @Darkratos commented on GitHub (Sep 19, 2024): > Unable to reproduce > > Original Workflow has no problems in act: https://github.com/wavoip/chatwoot/actions/runs/10913234450/workflow > > Why did you even replace `secrets.NAME` by `<redacted>`? This make the workflow invalid for both act and GitHub Actions. I redacted in the post, not on the code. Locally I just replaced by my actual credentials. I did not realize this would actually access the repository's variables.
Author
Owner

@ChristopherHX commented on GitHub (Sep 19, 2024):

For secrets are secret files that map secret names to values

e.g. a secret Name can get a value by

  • -s Name=mysecretval
  • Name=mysecretval as a line in .secrets

Should be described on nektosact.com

My advice, To do what you have tried correctly then you have to replace ${{ secret.NAME }} by your secret, don't leave it as expression.

Like sayed, it's not recommend to make such changes in workflow files directly

I redacted in the post, not on the code.

Act would show the exact same message in both cases, so I couldn't notice that detail.

<!-- gh-comment-id:2362256032 --> @ChristopherHX commented on GitHub (Sep 19, 2024): For secrets are secret files that map secret names to values e.g. a secret Name can get a value by - `-s Name=mysecretval` - `Name=mysecretval` as a line in `.secrets` Should be described on nektosact.com My advice, To do what you have tried correctly then you have to replace ${{ secret.NAME }} by your secret, don't leave it as expression. Like sayed, it's not recommend to make such changes in workflow files directly > I redacted in the post, not on the code. Act would show the exact same message in both cases, so I couldn't notice that detail.
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#1138
No description provided.