Bump actions/checkout from 4.1.7 to 4.2.2 #630
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: 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/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: update controls files | |
uses: fhem/[email protected] | |
with: | |
filename: controls_SD_TOOL.txt | |
- name: update controls files (append) | |
uses: fhem/[email protected] | |
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 "[email protected]" | |
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/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ steps.extract_branch.outputs.branch }} |