Skip to content

Commit 711816a

Browse files
committed
chore(ci): add a workflow to auto-commit docs changes
1 parent 098fd3f commit 711816a

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Auto commit docs updates
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
update_docs:
8+
name: Update CLI Docs
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
12+
with:
13+
fetch-depth: 1
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
17+
with:
18+
go-version-file: go.mod
19+
20+
- name: Build CLI docs
21+
run: make docs
22+
23+
- name: Commit and push docs changes
24+
run: |
25+
git config --global user.name 'equinix-labs@auto-commit-workflow'
26+
git config --global user.email 'bot@equinix.noreply.github.com'
27+
git config advice.addIgnoredFile false
28+
git add docs
29+
echo -e "\nGit status:"
30+
echo `git status`
31+
cdate=`date`
32+
cmsg="Auto commit generated docs changes - $cdate"
33+
echo -e "\nCommit message created : $cmsg"
34+
echo -e "\nCommitting if there are files to update in client dir:"
35+
echo `git commit -m "$cmsg"`
36+
echo `git push`

0 commit comments

Comments
 (0)