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

Make jobs.<job_id>.steps required in job-factory #98

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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