Update generated Vale files on a branch #9
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: Rebuild the dictionaries on a branch | |
on: | |
workflow_dispatch: | |
inputs: | |
trace: | |
default: false | |
description: Print command traces? | |
required: false | |
type: boolean | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- working-directory: vale/dictionaries | |
run: | | |
set -euf -o pipefail | |
if ${{ inputs.trace }}; then | |
set -x | |
fi | |
# commit adds and commits the updated files as the Grafanabot GitHub user. | |
function commit { | |
git add . | |
git config --local user.email [email protected] | |
git config --local user.name grafanabot | |
git commit --message 'Regenerate dictionaries' | |
} | |
make -B all | |
if ! git diff --exit-code; then | |
commit | |
git push origin | |
fi |