Skip to content

Commit

Permalink
GH Actions workflows multiple "OneOf" is true (SchemaStore#2465)
Browse files Browse the repository at this point in the history
* fix issue SchemaStore#2463 GH Actions workflows

two items in OneOff is true. thats is why IntelliJ give error.
"$ref": "..." must be without other keyword in draft 04..07

* add test file mentioned in issue SchemaStore#2463
  • Loading branch information
GerryFerdinandus authored and jmatias committed Sep 20, 2022
1 parent 60295e6 commit 44e14db
Show file tree
Hide file tree
Showing 3 changed files with 672 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/schemas/json/github-workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@
}
},
{
"$ref": "#/definitions/expressionSyntax",
"type": "string",
"pattern": "^\\$\\{\\{\\s*(secrets|inputs)\\s*\\}\\}$"
},
{
"$ref": "#/definitions/expressionSyntax",
"type": "string",
"$comment": "https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson",
"pattern": "^\\$\\{\\{\\s*fromJSON\\(.*\\)\\s*\\}\\}$"
}
Expand Down
31 changes: 31 additions & 0 deletions src/test/github-workflow/issue_2463_file_1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Example workflow for schema store"

on:
push:
branches:
- "**"

jobs:
vulnerabilities:
name: Example workflow for schema store
runs-on: ubuntu-latest
steps:
- name: Setup ssh keys
env:
TEST_VALUE_5: ${{ secrets.TEST_VALUE_5 }}
TEST_VALUE_6: ${{ secrets.TEST_VALUE_6 }}
run: |-
# Just some fake commands
apt-get update
apt-get install -y vim
- name: Cache composer
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
env:
TEST_VALUE_1: ${{ secrets.TEST_VALUE_1 }}
TEST_VALUE_2: ${{ secrets.TEST_VALUE_2 }}
TEST_VALUE_3: "TEST VALUE 3"
TEST_VALUE_4: ${{ secrets.TEST_VALUE_4 }}
Loading

0 comments on commit 44e14db

Please sign in to comment.