Skip to content
This repository was archived by the owner on Dec 27, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
name: Build markdown files

on: push
on:
push:
branches:
- main
Comment on lines +3 to +6
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: workflow will run twice per change: once on initial push to main, and again when the auto-merged PR pushes to main. consider adding a skip condition to prevent the second run when the commit author is "GitHub Actions Bot"

Suggested change
on:
push:
branches:
- main
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'INSTALL.md'

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/markdown.yml
Line: 3:6

Comment:
**style:** workflow will run twice per change: once on initial push to `main`, and again when the auto-merged PR pushes to `main`. consider adding a skip condition to prevent the second run when the commit author is "GitHub Actions Bot"

```suggestion
on:
  push:
    branches:
      - main
    paths-ignore:
      - 'README.md'
      - 'INSTALL.md'
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

paths-ignore:
- 'README.md'
- 'INSTALL.md'

jobs:
markdown-build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -17,12 +26,18 @@ jobs:
- name: Build
run: go run assembly/main.go

- name: Git commit and push files
- name: Create PR for markdown changes
run: |
if [ -n "$(git status --porcelain)" ]; then
BRANCH="docs/markdown-update-$(date +%s)"
git config --global user.name "GitHub Actions Bot"
git config --global user.email "<>"
git checkout -b "$BRANCH"
git add -A
git commit -m "Markdown build $(date)"
git push -u origin HEAD
git commit -m "docs: update generated markdown"
git push -u origin "$BRANCH"
gh pr create --title "docs: update generated markdown" --body "Auto-generated markdown update" --head "$BRANCH" --base main
gh pr merge --auto --squash
fi
env:
GH_TOKEN: ${{ github.token }}