Set a moto version in the workshop, higher versions failing #399
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
name: Metadata Validation | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
jobs: | |
default: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: get_changed | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: "*-test-samples/**" | |
separator: "," | |
- name: Echo changed files | |
id: setfiles | |
run: | | |
files=${{ steps.get_changed.outputs.all_changed_files }} | |
echo $files | |
echo "FILES=$files" >> $GITHUB_OUTPUT | |
if [[ ! -z "$files" ]]; then | |
echo "run_validate=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Set up Python 3.10 | |
if: ${{ steps.setfiles.outputs.run_validate == 'true' }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install requirements | |
if: ${{ steps.setfiles.outputs.run_validate == 'true' }} | |
run: pip install -r .github/metadata/requirements.txt | |
- name: Validate Schema | |
if: ${{ steps.setfiles.outputs.run_validate == 'true' }} | |
run: python .github/metadata/metadata_json_validator.py | |
env: | |
ALL_CHANGED_FILES: ${{ steps.get_changed.outputs.all_changed_files }} | |
PR_NUMBER: ${{ github.event.number }} | |
GITHUB_AUTOMATION: true | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |