create filter_file step id to reference varible #15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# Validate a dcc config file against the dca_config schema | |
# ------------------------------------------------------------------------------ | |
name: validate dcc config | |
on: | |
push: | |
paths: | |
- 'dcc/*dca_config.json' | |
- 'test/*dca_config.json' | |
- 'schemas/dca_config.schema.json' | |
pull_request: | |
branches: | |
- 'main' | |
- 'staging' | |
- 'dev' | |
jobs: | |
validate-dcc-config: | |
runs-on: ubuntu-latest | |
steps: | |
- id: files | |
uses: masesgroup/retrieve-changed-files@v3 | |
- id: filter_files | |
run: | | |
echo "configs=$(echo ${{ steps.files.outputs.added_modified }} | tr ' ' '\n' | grep dca_config\\.json)" >> "$GITHUB_OUTPUT" | |
echo ${configs} | |
- uses: actions/checkout@v4 | |
- name: Validate JSON | |
uses: docker://orrosenblatt/validate-json-action:latest | |
env: | |
INPUT_SCHEMA: schemas/dca_config.schema.json | |
INPUT_JSONS: ${{ steps.filter_files.outputs.configs }} | |