-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (37 loc) · 1.29 KB
/
docs-commands-update.yml
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
name: Generate, update commands documentation
on:
push:
branches:
- develop
- hotfix/*
jobs:
docs-commands-update:
if: "!contains(github.event.head_commit.message, '[skip docs commands generate]')"
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN_REPO_FULL_ACCESS }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Run GoReleaser artifact build
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: v1.23.0
args: build --clean --skip=validate
- name: Update and commit new commands documentation
run: |
echo "Configure Git user.name and user.email."
git config user.name github-actions
git config user.email github-actions@github.com
echo "Generate new commands documentation."
./dist/rmk_linux_amd64_v1/rmk doc generate > ./docs/commands.md
if (git commit --all --message="[skip docs commands update] Update commands documentation"); then
git push
echo "The new commands documentation has been committed."
fi