Skip to content

Conversation

@muzimuzhi
Copy link
Contributor

Fixes github/vscode-github-actions#291.

This PR makes steps property required by jobs that don't call reusable workflows.

The only non-test change is

--- a/workflow-parser/src/workflow-v1.0.json
+++ b/workflow-parser/src/workflow-v1.0.json
@@ -1700,7 +1700,10 @@
           "concurrency": "job-concurrency",
           "outputs": "job-outputs",
           "defaults": "job-defaults",
-          "steps": "steps"
+          "steps": {
+            "type": "steps",
+            "required": true
+          }
         }
       }
     },

Without steps, such jobs won't even run. It's shown in muzimuzhi/hello-github-actions#33 that triggering workflow file

on:
  push:
  workflow_dispatch: # optional
jobs:
  no-steps:
    runs-on: ubuntu-latest

would fail with

Invalid workflow file: .github/workflows/test-github-actions.yml#L1
No steps defined in `steps` and no workflow called in `uses` for the following jobs: no-steps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lack of both steps and uses isn't flagged as an error

1 participant