feat: Reference JSON Schema #657
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: controlsFile | |
| on: [push] | |
| jobs: | |
| update: | |
| env: | |
| CONTROLS_FILENAME: controls_SD_TOOL.txt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Extract branch name | |
| run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
| id: extract_branch | |
| - name: Checkout Repostory | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: update controls files | |
| uses: fhem/fhem-controls-actions@v3.0.0 | |
| with: | |
| filename: controls_SD_TOOL.txt | |
| - name: update controls files (append) | |
| uses: fhem/fhem-controls-actions@v3.0.0 | |
| with: | |
| filename: controls_SD_TOOL.txt | |
| writemode: a | |
| directory: FHEM/lib | |
| extension: .json | |
| - name: update CHANGED | |
| run: | | |
| LOG=$(date +"%Y-%m-%d") | |
| LOG+=" - $(git log -1 --pretty=%B)" | |
| echo "$LOG" | cat - CHANGED > temp && mv temp CHANGED | |
| - name: git commit back | |
| run: | | |
| git config --global user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add CHANGED ${CONTROLS_FILENAME} || true | |
| git log -n1 --grep="^Automaitc updated controls" --format=format:%H | xargs -n 1 -i{} git log {}~1..HEAD --name-only --pretty=format: | grep -Eo '[0-9]{2}_.*.pm$|*.json$' && git commit CHANGED ${CONTROLS_FILENAME} -m "Automaitc updated controls and CHANGED" || true | |
| - name: git push | |
| uses: ad-m/github-push-action@v1.0.0 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: ${{ steps.extract_branch.outputs.branch }} |