Skip to content

Fix brightness and screenshot shortcuts in MainUI #574

Fix brightness and screenshot shortcuts in MainUI

Fix brightness and screenshot shortcuts in MainUI #574

Workflow file for this run

name: Enforce formatting
on:
pull_request:
paths:
- 'src/**'
jobs:
format:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# check out HEAD on the branch
ref: ${{ github.head_ref }}
# make sure the parent commit is grabbed as well, because
# that's what will get formatted (i.e. the most recent commit)
fetch-depth: 2
- name: Get all src files that have changed
id: changed-files
uses: tj-actions/changed-files@v37
with:
files_yaml: |
src:
- src/**/*.c
- src/**/*.h
- src/**/*.cpp
- src/**/*.hpp
- name: List all changed src files
run: |
for file in ${{ steps.changed-files.outputs.src_all_changed_files }}; do
echo "$file was changed"
done
- name: Apply formatting
if: steps.changed-files.outputs.src_any_changed == 'true'
run: |
sudo apt install clang-format
for file in ${{ steps.changed-files.outputs.src_all_changed_files }}; do
echo "clang-format -i '$file'"
clang-format -style=file -i "$file"
done
# commit the changes (if there are any)
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_message: 🎨 apply clang-format changes
branch: ${{ github.head_ref }}