summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/docs-update.yml
diff options
context:
space:
mode:
authorja <[email protected]>2025-12-29 16:47:47 -0500
committerGitHub <[email protected]>2025-12-29 15:47:47 -0600
commitc3d86727539b8afdb1882b814f2a345ee0240822 (patch)
treedcbf5a9704b8d753bf6115298c9fe3a2e3bf9597 /.github/workflows/docs-update.yml
parentfe8ef041f620897946d9646d3c9fbe89d6918d0c (diff)
downloadopencode-c3d86727539b8afdb1882b814f2a345ee0240822.tar.gz
opencode-c3d86727539b8afdb1882b814f2a345ee0240822.zip
ci: use env vars for DRY workflow config (#6395)
Diffstat (limited to '.github/workflows/docs-update.yml')
-rw-r--r--.github/workflows/docs-update.yml9
1 files changed, 6 insertions, 3 deletions
diff --git a/.github/workflows/docs-update.yml b/.github/workflows/docs-update.yml
index 11d6a9c82..a8dd2ae4f 100644
--- a/.github/workflows/docs-update.yml
+++ b/.github/workflows/docs-update.yml
@@ -5,6 +5,9 @@ on:
- cron: "0 */12 * * *"
workflow_dispatch:
+env:
+ LOOKBACK_HOURS: 4
+
jobs:
update-docs:
if: github.repository == 'sst/opencode'
@@ -25,9 +28,9 @@ jobs:
- name: Get recent commits
id: commits
run: |
- COMMITS=$(git log --since="4 hours ago" --pretty=format:"- %h %s" 2>/dev/null || echo "")
+ COMMITS=$(git log --since="${{ env.LOOKBACK_HOURS }} hours ago" --pretty=format:"- %h %s" 2>/dev/null || echo "")
if [ -z "$COMMITS" ]; then
- echo "No commits in the last 4 hours"
+ echo "No commits in the last ${{ env.LOOKBACK_HOURS }} hours"
echo "has_commits=false" >> $GITHUB_OUTPUT
else
echo "has_commits=true" >> $GITHUB_OUTPUT
@@ -47,7 +50,7 @@ jobs:
model: opencode/gpt-5.2
agent: docs
prompt: |
- Review the following commits from the last 4 hours and identify any new features that may need documentation.
+ Review the following commits from the last ${{ env.LOOKBACK_HOURS }} hours and identify any new features that may need documentation.
<recent_commits>
${{ steps.commits.outputs.list }}