这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 53 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,56 @@
# Landscape2 validate action

This GitHub action checks if the provided landscape data file (`landscape.yml`) is valid.
This GitHub action checks if the provided landscape datasource file is valid.

## Usage

### Validate data file

```yaml
name: Validate

on:
push:
branches:
- main

jobs:
validate-landscape-data:
runs-on: ubuntu-latest
name: "Validate landscape data file"
steps:
- uses: actions/checkout@v3
- uses: cncf/landscape2-validate-action@v2
with:
target_kind: data
target_path: ./landscape.yml
```

### Validate settings file

```yaml
name: Validate

on:
push:
branches:
- main

jobs:

validate-landscape-settings:
runs-on: ubuntu-latest
name: "Validate landscape settings file"
steps:
- uses: actions/checkout@v3
- uses: cncf/landscape2-validate-action@v2
with:
target_kind: settings
target_path: ./settings.yml
```

### Validate guide file

```yaml
name: Validate

Expand All @@ -13,14 +60,15 @@ on:
- main

jobs:
validate-landscape:
validate-landscape-guide:
runs-on: ubuntu-latest
name: "Validate landscape.yml file"
name: "Validate landscape guide file"
steps:
- uses: actions/checkout@v3
- uses: cncf/landscape2-validate-action@v1
- uses: cncf/landscape2-validate-action@v2
with:
data_file: ./landscape.yml
target_kind: guide
target_path: ./guide.yml
```

## Contributing
Expand Down
15 changes: 8 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: Landscape2 validate action

inputs:
data_file:
description: 'Landscape data file local path'
target_kind:
description: 'Kind of file to validate'
required: true
target_path:
description: 'Path of file to validate'
required: true

runs:
using: 'docker'
image: 'docker://public.ecr.aws/g6m3a0y9/landscape2'
entrypoint: landscape2
entrypoint: /landscape2-validate.sh
args:
- validate
- data
- --data-file
- ${{ inputs.data_file }}
- ${{ inputs.target_kind }}
- ${{ inputs.target_path }}