-
Notifications
You must be signed in to change notification settings - Fork 1.1k
61 lines (53 loc) · 1.88 KB
/
Copy pathupdate-docs.yml
File metadata and controls
61 lines (53 loc) · 1.88 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
57
58
59
60
61
name: Update Template Documentation
on:
schedule:
- cron: '0 16 * * 2' # Every Tuesday at 11 AM EST (16:00 UTC)
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-docs:
name: Update Template Documentation
runs-on: ubuntu-latest
if: github.repository == 'GoogleCloudPlatform/DataflowTemplates'
steps:
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install Templates Plugin
run: |
mvn clean install -pl plugins/templates-maven-plugin -am
- name: Generate Documentation
run: |
mvn clean prepare-package \
-DskipTests \
-PtemplatesSpec
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'docs: update generated documentation'
title: 'chore(docs): update generated documentation'
body: |
This PR updates the generated documentation for the templates.
This is an automated PR created by the update-docs workflow.
branch: chore/update-generated-docs
base: main
- name: Verify PR Creation
if: steps.cpr.outputs.pull-request-number == ''
run: |
echo "::error::pull request was not created. This is normal when there are no doc changes."
exit 1
- name: Add ignore-for-release label to PR
uses: actions-ecosystem/action-add-labels@v1.1.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
labels: ignore-for-release
number: ${{ steps.cpr.outputs.pull-request-number }}