-
Notifications
You must be signed in to change notification settings - Fork 47
47 lines (43 loc) · 1.63 KB
/
sync-documentation.yml
File metadata and controls
47 lines (43 loc) · 1.63 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
name: Sync-Documentation
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
update-documentationmd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Record submodule state
run: ./tools/check-submodule-docs.sh record > /tmp/old_submodules.txt
- name: Update documentation
run: make refresh-docs
- name: Check for documentation changes
id: verify_changes
run: |
if ./tools/check-submodule-docs.sh check /tmp/old_submodules.txt /tmp/pr_body.txt; then
echo "has_changes=true" >> $GITHUB_OUTPUT
{
echo 'pr_body<<EOF'
echo "This is an auto-generated PR to sync updates in the main containerd project's documentation."
echo ''
echo '### Relevant changes detected:'
cat /tmp/pr_body.txt
echo 'EOF'
} >> "$GITHUB_OUTPUT"
else
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
if: steps.verify_changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: |
keep documentation in sync with containerd/containerd
Signed-off-by: Samuel Karp <samuelkarp+automated@google.com>
committer: Samuel Karp <samuelkarp@google.com>
author: Samuel Karp <samuelkarp+automated@google.com>
title: Automated documentation sync update
body: ${{ steps.verify_changes.outputs.pr_body }}
branch: docs-updates