Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow is not valid / Unknown property inputs #2476

Open
BBBmau opened this issue Sep 29, 2024 · 6 comments
Open

workflow is not valid / Unknown property inputs #2476

BBBmau opened this issue Sep 29, 2024 · 6 comments
Labels
kind/bug Something isn't working

Comments

@BBBmau
Copy link

BBBmau commented Sep 29, 2024

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

@BBBmau BBBmau added the kind/bug Something isn't working label Sep 29, 2024
@sebastien-perpignane
Copy link
Contributor

sebastien-perpignane commented Oct 11, 2024

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 :)

@ChristopherHX
Copy link
Contributor

...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

@sebastien-perpignane
Copy link
Contributor

Hi @ChristopherHX

Do you think that some code change ignoring yaml files named "action" in .github/workflows would be a correct fix ?

@ChristopherHX
Copy link
Contributor

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

@tsny-houzz
Copy link

This is also happening to me and only with composite workflows.

@ChristopherHX
Copy link
Contributor

composite workflows

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 -W cli 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants