mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Merge pull request #114 from jesseduffield/ci-cheatsheet
update docs when merging to master
This commit is contained in:
commit
17fc1bd2e3
2 changed files with 38 additions and 0 deletions
|
|
@ -36,6 +36,17 @@ jobs:
|
||||||
paths:
|
paths:
|
||||||
- ~/.cache/go-build
|
- ~/.cache/go-build
|
||||||
|
|
||||||
|
update-docs:
|
||||||
|
docker:
|
||||||
|
- image: circleci/golang:1.12
|
||||||
|
working_directory: /go/src/github.com/jesseduffield/lazydocker
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Update docs
|
||||||
|
command: |
|
||||||
|
./.circleci/update_docs.sh
|
||||||
|
|
||||||
release:
|
release:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/golang:1.12
|
- image: circleci/golang:1.12
|
||||||
|
|
@ -66,6 +77,11 @@ workflows:
|
||||||
build:
|
build:
|
||||||
jobs:
|
jobs:
|
||||||
- build
|
- build
|
||||||
|
- update-docs:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
release:
|
release:
|
||||||
jobs:
|
jobs:
|
||||||
- release:
|
- release:
|
||||||
|
|
|
||||||
22
.circleci/update_docs.sh
Executable file
22
.circleci/update_docs.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# see if we have a new cheatsheet
|
||||||
|
# if other docs end up being generated automatically we can chuck in the relevant scripts here
|
||||||
|
go run scripts/generate_cheatsheet.go
|
||||||
|
|
||||||
|
# commit and push if we have a change
|
||||||
|
if [[ -z $(git status -s -- docs/*) ]]; then
|
||||||
|
echo "no changes to commit in the docs directory"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "committing updated docs"
|
||||||
|
|
||||||
|
git config user.name "lazydocker bot"
|
||||||
|
git config user.email "jessedduffield@gmail.com"
|
||||||
|
|
||||||
|
git add docs/*
|
||||||
|
git commit -m "update docs"
|
||||||
|
git push -u origin HEAD
|
||||||
Loading…
Add table
Reference in a new issue