Bump actions/checkout from 5 to 6 #360
Workflow file for this run
This file contains hidden or 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: Validate team member ID card | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| validate-team-member-id: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| install-r: true | |
| use-public-rspm: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libcurl4-openssl-dev | |
| - uses: r-lib/actions/setup-renv@v2 | |
| - name: Validate yml files | |
| run: | | |
| library(magrittr) | |
| schema <- "_data/team/_schema.yml" %>% | |
| yaml::read_yaml() %>% | |
| jsonlite::toJSON(auto_unbox = TRUE) | |
| fs::dir_ls("_data/team", regexp = "\\w+\\-\\w+\\.yml") %>% | |
| purrr::map(yaml::read_yaml) %>% | |
| purrr::map(jsonlite::toJSON, auto_unbox = TRUE) %>% | |
| purrr::map( | |
| jsonvalidate::json_validate, schema, engine = "ajv", error = TRUE, | |
| greedy = TRUE, verbose = TRUE | |
| ) | |
| shell: Rscript {0} |