chore(deps): Bump actions/upload-pages-artifact from 3 to 4 (#34) #66
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: Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| yaml: | |
| name: Check projects.yaml | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Fetch projects.yaml | |
| uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: | | |
| projects.yaml | |
| scripts/projects.schema.json | |
| sparse-checkout-cone-mode: false | |
| - name: Install boon | |
| run: | | |
| wget https://github.com/santhosh-tekuri/boon/releases/download/v0.6.1/boon-x86_64-unknown-linux-gnu.tar.gz | |
| tar -xzf boon-x86_64-unknown-linux-gnu.tar.gz | |
| sudo mv boon /usr/local/bin/boon | |
| - name: Get names | |
| uses: mikefarah/yq@master | |
| id: projects-names | |
| with: | |
| cmd: yq '.projects.[] | line + " " + .name' projects.yaml | |
| - name: Make sure names are unique | |
| run: | | |
| duplicates=$(echo "${{ steps.projects-names.outputs.result }}" | sort --key 2 | uniq --skip-fields=1 --all-repeated) | |
| if [ -n "$duplicates" ]; then | |
| echo "# Some projects' names are duplicate" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| echo "$duplicates" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi | |
| - name: Validate according to the schema | |
| run: | | |
| boon scripts/projects.schema.json projects.yaml |