-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.86 KB
/
Copy pathusage-rules-sync.yaml
File metadata and controls
56 lines (53 loc) · 1.86 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: usage-rules-sync
on: # yamllint disable-line rule:truthy
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
sync:
name: Sync AGENTS.md usage rules
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
steps:
-
uses: actions/checkout@v7
-
uses: erlef/setup-beam@v1
with:
otp-version: "29.0.3"
elixir-version: "1.20.3"
disable_problem_matchers: true
-
run: mix deps.get
-
# Applies non-interactively. Verified this is a no-op (exit 0, no
# changes) when AGENTS.md is already in sync with the current
# usage_rules config, so this workflow is safe to run on every
# push to main with no extra guard needed - see #79.
name: Sync AGENTS.md from the current usage_rules config
run: mix usage_rules.sync --yes
-
# No-op (no PR opened, nothing pushed) when there's nothing to
# commit - verified against the action's own docs. Note: a PR
# opened here via the default GITHUB_TOKEN queues ci.yaml's own
# run but leaves it pending manual approval (GitHub's anti-loop
# protection for token-authored PRs) - not a full CI skip, just
# an extra click before it runs.
name: Open a PR if the sync produced any changes
uses: peter-evans/create-pull-request@v8
with:
commit-message: "chore: sync AGENTS.md usage rules"
title: "chore: sync AGENTS.md usage rules"
body: >-
Auto-generated by the usage-rules-sync workflow - `mix
usage_rules.sync` found the checked-in AGENTS.md out of sync
with the current ash/oban usage-rules content and applied the
update.
branch: usage-rules-sync
delete-branch: true