-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.48 KB
/
update-docs-and-licenses.yml
File metadata and controls
42 lines (35 loc) · 1.48 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
# Copyright (c) Codesphere Inc.
# SPDX-License-Identifier: Apache-2.0
name: 'Auto-Update Docs & Licenses'
permissions:
contents: write
on:
pull_request:
types: [opened, synchronize]
jobs:
update-files:
# skip runs triggered by the bot's own commit to avoid loops and runs triggered by renovate
if: github.actor != 'github-actions[bot]' && !startsWith(github.event.pull_request.head.ref, 'renovate/')
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
# on push to main, use main; on PR, check out the PR head
ref: ${{ github.event.pull_request.head.ref || github.ref }}
# Use PAT to ensure commits trigger other workflows
token: ${{ secrets.PAT_UPDATE_DOCS }}
- name: Set up Go
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6
with:
go-version: '1.25.6'
- name: Update docs & licenses
run: |
./hack/update-docs-and-licenses.sh
- name: Commit and push auto-generated changes
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9
with:
author_name: ${{ github.event.pull_request.user.login }}
author_email: ${{ github.event.pull_request.user.id }}+${{ github.event.pull_request.user.login }}@users.noreply.github.com
message: 'chore(docs): Auto-update docs and licenses'
commit: '--signoff'