Skip to content

Merge pull request #3 from soerenschneider/release-please--branches--… #7

Merge pull request #3 from soerenschneider/release-please--branches--…

Merge pull request #3 from soerenschneider/release-please--branches--… #7

Workflow file for this run

---
name: cobra
on:
push:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.0
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: build binary
run: make build
# this makes sure that no cobra flags are wrongly assigned
- name: exec binary
run: ./sc --help
- name: update cobra docs
run: go run -tags=docgen main.go docs
- name: Commit and push changes
run: |
if [[ -n $(git status --porcelain) ]]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "docs: Auto-update documentation"
git push origin main
else
echo "No changes detected. Nothing to commit."
fi