feat(bms), replace old firmware with IIT1A_100425_07.elf (LED-strip) #6
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: PR Folder Check | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
check-files: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Get PR files | |
id: pr_files | |
run: | | |
PR_NUMBER=$(jq --raw-output .number "$GITHUB_EVENT_PATH") | |
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/files > pr_files.json | |
- name: Check if specific files are modified | |
id: check_files | |
run: | | |
TMP_OR_DATA_MODIFIED=$(jq '.[] | select(.filename | startswith("ETH/AMC") or startswith("CAN/") or startswith("ETH/EMS/bin/application") or startswith("ETH/MC2PLUS/bin/application") or startswith("ETH/MC4PLUS/bin/application") )' pr_files.json) | |
SPECIFIC_FILE_MODIFIED=$(jq '.[] | select(.filename == "info/firmware.info.xml")' pr_files.json) | |
if [ -n "$TMP_OR_DATA_MODIFIED" ] && [ -z "$SPECIFIC_FILE_MODIFIED" ]; then | |
echo "The board's binary was updated, however, the info/firmware.info.xml file was not." | |
exit 1 | |
else | |
echo "All required files were modified as expected." | |
fi |