Skip to content

Commit 9e0a0f8

Browse files
committed
ci: periodically run update-generated
This introduces a GitHub workflow to periodically run `cargo xtask update-generated` in order to keep the docs up-to-date with the latest changes. It will create a PR if changes are detected. Signed-off-by: Micah Abbott <[email protected]>
1 parent 5c948a5 commit 9e0a0f8

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: 'Update Generated Files'
2+
3+
# This workflow is triggered on a schedule (every day at 3:15 AM UTC)
4+
# and can also be triggered manually from the GitHub Actions UI.
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '15 3 * * *'
9+
10+
jobs:
11+
update-and-pr:
12+
name: 'Update Generated Files and Create PR'
13+
runs-on: ubuntu-latest
14+
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
15+
steps:
16+
- name: 'Checkout repository'
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: 'Mark git directory as safe'
22+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
23+
shell: bash
24+
25+
- name: 'Install dependencies'
26+
run: ./ci/installdeps.sh
27+
shell: bash
28+
29+
- name: 'Install pandoc'
30+
run: dnf -y install pandoc
31+
shell: bash
32+
33+
- name: 'Update generated docs'
34+
run: cargo xtask update-generated
35+
shell: bash
36+
37+
- name: 'Create Pull Request'
38+
uses: peter-evans/create-pull-request@v6
39+
with:
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
commit-message: 'chore: Update generated files'
42+
committer: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
43+
author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'
44+
signoff: true
45+
title: 'docs: Update generated'
46+
body: |
47+
This PR was auto-generated by a GitHub Actions workflow.
48+
49+
It contains updates to doc files generated by `cargo xtask update-generated`.
50+
branch: 'actions/update-generated-files'
51+
labels: 'documentation'
52+

0 commit comments

Comments
 (0)