jenkins: Add mi439 support #1
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
name: Validate devices.json | |
on: | |
pull_request: | |
paths: | |
- 'devices.json' | |
jobs: | |
validate-json: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Validate devices.json | |
run: | | |
# Install jq (a lightweight and flexible command-line JSON processor) | |
sudo apt-get install jq | |
# Validate the JSON file using jq | |
jq empty devices.json | |
continue-on-error: true | |
- name: Comment on PR if validation fails | |
if: failure() | |
run: | | |
COMMENT="Hey! It looks like the devices.json file is invalid. Please ensure the file is properly formatted. You can validate it using [jq](https://stedolan.github.io/jq/)." | |
# Get the pull request number | |
PR_NUMBER=$(jq --raw-output .pull_request.number < $GITHUB_EVENT_PATH) | |
# Comment on the PR using GitHub API | |
curl -s -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \ | |
-X POST \ | |
-d '{"body": "'"$COMMENT"'"}' \ | |
"https://api.github.com/repos/${{github.repository}}/issues/$PR_NUMBER/comments" |