diff --git a/workflow-parser/src/workflow-v1.0.json b/workflow-parser/src/workflow-v1.0.json index 5e24de2c..8efa58fc 100644 --- a/workflow-parser/src/workflow-v1.0.json +++ b/workflow-parser/src/workflow-v1.0.json @@ -1710,7 +1710,11 @@ "concurrency": "job-concurrency", "outputs": "job-outputs", "defaults": "job-defaults", - "steps": "steps" + "steps": "steps", + "snapshot": { + "type": "snapshot", + "description": "snapshot for custom image" + } } } }, @@ -2522,6 +2526,12 @@ "string": { "require-non-empty": true } + }, + "snapshot": { + "description": "snapshot for custom image", + "string": { + "require-non-empty": true + } } } } diff --git a/workflow-parser/testdata/reader/snapshot.yml b/workflow-parser/testdata/reader/snapshot.yml new file mode 100644 index 00000000..4ca24958 --- /dev/null +++ b/workflow-parser/testdata/reader/snapshot.yml @@ -0,0 +1,34 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + build: + runs-on: ubuntu-latest + snapshot: custom-image + steps: + - run: echo hi +--- +{ + "jobs": [ + { + "type": "job", + "id": "build", + "name": "build", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + } + ] +} \ No newline at end of file