Skip to content

Update Lint Rules

Update Lint Rules #2

name: Update Lint Rules
# TODO:
# Set schedule event as soon as update mechanism is implemented.
# https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#schedule
on:
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-22.04
timeout-minutes: 5
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: '3.1.0' # See: tools/update_lint_rules/pubspec.yaml
- name: Install dependencies
run: dart pub get
shell: bash
working-directory: tools/update_lint_rules
- name: Run update_lint_rules
run: dart run bin/update_lint_rules.dart "$GITHUB_WORKSPACE/lib"
shell: bash
working-directory: tools/update_lint_rules
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
author: 'GitHub <[email protected]>'
commit-message: 'auto: Update lint rules'
title: Update lint rules
body: This was automatically generated by the [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}).
base: main
branch: auto/update-lint-rules
branch-suffix: short-commit-hash