workflow is not valid / Unknown property inputs
Bug report info
openpilot(base) ┌─(~/Dev/openpilot)────────────────────────────────────────────────────────────────────────────────────────────────────────────────(mau@mau-JKDT676NCP:s075)─┐
└─(11:19:23 on master)──> act --bug-report 1 ↵ ──(Sun,Sep29)─┘
act version: 0.2.67
GOOS: darwin
GOARCH: arm64
NumCPU: 10
Docker host: DOCKER_HOST environment variable is not set
Sockets found:
/var/run/docker.sock
$HOME/.docker/run/docker.sock
Config files:
/Users/mau/.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.23.1
Module path: command-line-arguments
Main version:
Main path:
Main checksum:
Build settings:
-buildmode: exe
-compiler: gc
-ldflags: -X main.version=0.2.67
DefaultGODEBUG: asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1
CGO_ENABLED: 1
CGO_CFLAGS:
CGO_CPPFLAGS:
CGO_CXXFLAGS:
CGO_LDFLAGS:
GOARCH: arm64
GOOS: darwin
GOARM64: v8.0
Docker Engine:
Engine version: 26.1.1
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: 6.6.26-linuxkit
OS CPU: 10
OS memory: 7840 MB
Security options:
name=seccomp,profile=unconfined
name=cgroupns
Command used with act
└─(11:12:22 on master)──> act --container-architecture linux/amd64 1 ↵ ──(Sun,Sep29)─┘
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock'
Error: workflow is not valid. 'action.yaml': Line: 3 Column 1: Unknown Property inputs
Line: 18 Column 1: Unknown Property runs
Describe issue
This happens on a fresh install of act using brew install act
Link to GitHub repository
https://github.com/commaai/openpilot
Workflow content
name: 'automatically cache based on current runner'
inputs:
path:
description: 'path to cache'
required: true
key:
description: 'key'
required: true
restore-keys:
description: 'restore-keys'
required: true
save:
description: 'whether to save the cache'
default: 'false'
required: false
runs:
using: "composite"
steps:
- name: setup namespace cache
if: ${{ contains(runner.name, 'nsc') }}
uses: namespacelabs/nscloud-cache-action@v1
with:
path: ${{ inputs.path }}
- name: setup github cache
if: ${{ !contains(runner.name, 'nsc') && inputs.save != 'false' }}
uses: 'actions/cache@v4'
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}
- name: setup github cache
if: ${{ !contains(runner.name, 'nsc') && inputs.save == 'false' }}
uses: 'actions/cache/restore@v4'
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
restore-keys: ${{ inputs.restore-keys }}
# make the directory manually in case we didn't get a hit, so it doesn't fail on future steps
- id: scons-cache-setup
shell: bash
run: |
mkdir -p ${{ inputs.path }}
sudo chmod -R 777 ${{ inputs.path }}
sudo chown -R $USER ${{ inputs.path }}
Relevant log output
openpilot(base) ┌─(~/Dev/openpilot)────────────────────────────────────────────────────────────────────────────────────────────────────────────────(mau@mau-JKDT676NCP:s075)─┐
└─(11:18:57 on master)──> act --container-architecture linux/amd64 -v 1 ↵ ──(Sun,Sep29)─┘
DEBU[0000] Handling container host and socket
DEBU[0000] Defaulting container socket to DOCKER_HOST
INFO[0000] Using docker host 'unix:///var/run/docker.sock', and daemon socket 'unix:///var/run/docker.sock'
DEBU[0000] Loading environment from /Users/mau/Dev/openpilot/.env
DEBU[0000] Loading action inputs from /Users/mau/Dev/openpilot/.input
DEBU[0000] Loading secrets from /Users/mau/Dev/openpilot/.secrets
DEBU[0000] Loading vars from /Users/mau/Dev/openpilot/.vars
DEBU[0000] Evaluated matrix inclusions: map[]
DEBU[0000] Conditional GET for notices etag=f3371bdd-b981-44c5-b378-9c778eedf272
DEBU[0000] Loading workflows from '/Users/mau/Dev/openpilot/.github/workflows'
DEBU[0000] Loading workflows recursively
DEBU[0000] Found workflow 'action.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/auto-cache/action.yaml'
DEBU[0000] Found workflow 'auto_pr_review.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/auto_pr_review.yaml'
DEBU[0000] Found workflow 'badges.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/badges.yaml'
DEBU[0000] Found workflow 'ci_weekly_report.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/ci_weekly_report.yaml'
DEBU[0000] Found workflow 'ci_weekly_run.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/ci_weekly_run.yaml'
DEBU[0000] Found workflow 'action.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/compile-openpilot/action.yaml'
DEBU[0000] Found workflow 'docs.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/docs.yaml'
DEBU[0000] Found workflow 'jenkins-pr-trigger.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/jenkins-pr-trigger.yaml'
DEBU[0000] Found workflow 'prebuilt.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/prebuilt.yaml'
DEBU[0000] Found workflow 'release.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/release.yaml'
DEBU[0000] Found workflow 'repo-maintenance.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/repo-maintenance.yaml'
DEBU[0000] Found workflow 'selfdrive_tests.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/selfdrive_tests.yaml'
DEBU[0000] Found workflow 'action.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/setup/action.yaml'
DEBU[0000] Found workflow 'action.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/setup-with-retry/action.yaml'
DEBU[0000] Found workflow 'stale.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/stale.yaml'
DEBU[0000] Found workflow 'tools_tests.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/tools_tests.yaml'
DEBU[0000] Found workflow 'ui_preview.yaml' in '/Users/mau/Dev/openpilot/.github/workflows/ui_preview.yaml'
DEBU[0000] Reading workflow '/Users/mau/Dev/openpilot/.github/workflows/auto-cache/action.yaml'
Error: workflow is not valid. 'action.yaml': Line: 3 Column 1: Unknown Property inputs
Line: 18 Column 1: Unknown Property runs
Additional information
No response
Hi,
I think that's because act expects workflow yaml files in .github/workflows/ directory, not action yaml files.
As the log says, "DEBU[0000] Reading workflow '/Users/mau/Dev/openpilot/.github/workflows/auto-cache/action.yaml' "
I think you should consider to move your actions in a .github/actions dir to make your repo compatible with GitHub and with act. That's what I would try to do if I had the same issue :)
...The problem is actually that a feature request for GitHub Actions ",Workflows in subdirectories of .github/workflows" has been implemented in act
A PR that reverts/removes the feature would resolve this
Older versions would have handled an action.yml file as an empty workflow, which is incorrect
Hi @ChristopherHX
Do you think that some code change ignoring yaml files named "action" in .github/workflows would be a correct fix ?
Do you think that some code change ignoring yaml files named "action" in .github/workflows would be a correct fix ?
No, action.yml is a valid name for a workflow in .github/workflows until you can provide me an example on GitHub that shows the opposite.
Ignoring files without .yml/.yaml extension should be implemented in my opinion
This is also happening to me and only with composite workflows.
compositeworkflows
I don't like this term, because it is not 100% clear if it is a workflow or an action.
- composite actions (I guess you mean this, because of the validation error)
- are not workflows
- make act abort when in .github/workflows without
-Wcli parameter to a actual workflow - action.yml / action.yaml files anywhere
- Only job steps can use them
- reusable workflow
- must be in .github/workflows folder
- any yaml file name
- make act pass validation
- this is the composite action concept for workflows
IMO putting yaml files that are not workflows in .github/workflows is going to be a problem for you soon, when GitHub adds support for organizing workflows in folders this feature got label backlog for GitHub Actions
Issue is stale and will be closed in 14 days unless there is new activity