-
Notifications
You must be signed in to change notification settings - Fork 45
56 lines (46 loc) · 1.85 KB
/
bot_update_exclusions.yaml
File metadata and controls
56 lines (46 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: bot_update_exclusions
on:
# This should ideally trigger whenever there is a commit to the [Dart Linter rules](https://raw.githubusercontent.com/dart-lang/sdk/main/pkg/linter/tool/machine/rules.json).
# However, this is not yet possible see: https://github.com/orgs/community/discussions/26323
schedule:
# At 08:06 on every day-of-week from Monday through Friday.
- cron: "6 8 * * 1-5"
workflow_dispatch:
jobs:
build:
defaults:
run:
working-directory: tool/linter_rules
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
- name: 📦 Install Dependencies
run: dart pub get
- name: 🔍 Check for exclusions changes
id: make
run: (dart lib/exclusion_reason_table.dart --set-exit-if-changed && echo "did_change=false" >> $GITHUB_ENV) || echo "did_change=true" >> $GITHUB_ENV
- name: 🔑 Config Git User
if: ${{ env.did_change == 'true' }}
run: |
git config user.name VGV Bot
git config user.email vgvbot@users.noreply.github.com
- name: ✍️ Make changes
if: ${{ env.did_change == 'true' }}
run: dart lib/exclusion_reason_table.dart
- name: 📝 Create Pull Request
if: ${{ env.did_change == 'true' }}
uses: peter-evans/create-pull-request@v7.0.6
with:
base: main
branch: chore/update-spdx-license
commit-message: "docs: update exclusion table"
title: "docs: update exclusion table"
body: |
There are rules that require an update to their exclusion reasons.
labels: bot
author: VGV Bot <vgvbot@users.noreply.github.com>
assignees: vgvbot
committer: VGV Bot <vgvbot@users.noreply.github.com>