Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- name: Set branch name
id: vars
run: |
ref=${{ github.event.pull_request.head.ref }}
if [ "$ref" == "refs/heads/main" ]; then
ref="${{ github.event.pull_request.head.ref || github.ref_name }}"
if [ "$ref" = "refs/heads/main" ] || [ "$ref" = "main" ]; then
echo "branch=main" >> $GITHUB_OUTPUT
else
echo "branch=${ref}" >> $GITHUB_OUTPUT
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/generate-actions-list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ concurrency:

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # Run at midnight UTC every Sunday

permissions:
contents: write
actions: write

jobs:
generate-packages:
Expand All @@ -34,7 +37,7 @@ jobs:
- name: Generate packages list
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
run: node scripts/generate_actions.mjs
run: bun scripts/generate_actions.mjs
- name: Check for changes
id: git-check
run: |
Expand All @@ -45,6 +48,8 @@ jobs:
fi
- name: Commit and push generated files
if: steps.git-check.outputs.changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand All @@ -53,7 +58,7 @@ jobs:
git add .gitattributes 2>/dev/null || true
git add loadedVectorStore/*.json loadedVectorStore/*.index 2>/dev/null || true
git add -A
git commit -m "chore: update NPM packages list [skip ci]" \
git commit -m "chore: update NPM packages list" \
Comment thread
riderx marked this conversation as resolved.
-m "Automated update from generate-actions workflow" \
-m "Run ID: ${{ github.run_id }}"
# Try to pull and rebase in case of conflicts
Expand All @@ -64,6 +69,7 @@ jobs:
exit 1
}
git push origin main
gh workflow run deploy.yml --ref main
- name: Report no changes
if: steps.git-check.outputs.changes != 'true'
run: echo "✅ No changes to commit - packages list is up to date"
6 changes: 5 additions & 1 deletion .github/workflows/train-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
actions: write

jobs:
deploy:
Expand Down Expand Up @@ -47,6 +48,8 @@ jobs:

- name: Commit generated files
if: steps.git-check.outputs.changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand All @@ -55,7 +58,7 @@ jobs:
git add .gitattributes 2>/dev/null || true
git add loadedVectorStore/*.json loadedVectorStore/*.index 2>/dev/null || true
git add -A
git commit -m "chore: update trained model [skip ci]" \
git commit -m "chore: update trained model" \
-m "Automated update from train-model workflow" \
-m "Run ID: ${{ github.run_id }}"
git pull --rebase origin main || {
Expand All @@ -65,6 +68,7 @@ jobs:
exit 1
}
git push origin main
gh workflow run deploy.yml --ref main
working-directory: ./

- name: Report no changes
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/write-readmes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ concurrency:

on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 0' # Run at 1AM UTC every Sunday

permissions:
contents: write
actions: write

jobs:
fetch-and-create:
Expand All @@ -32,7 +35,7 @@ jobs:
- name: Install dependencies
run: bun install
- name: Create READMEs
run: node scripts/write_readme.mjs
run: bun scripts/write_readme.mjs
env:
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }}
- name: Check for changes
Expand All @@ -45,6 +48,8 @@ jobs:
fi
- name: Commit and push generated files
if: steps.git-check.outputs.changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand All @@ -55,7 +60,7 @@ jobs:
git add loadedVectorStore/*.json loadedVectorStore/*.index 2>/dev/null || true
git add -A

git commit -m "chore: update READMEs from NPM packages [skip ci]" \
git commit -m "chore: update READMEs from NPM packages" \
-m "Automated update from write-readmes workflow" \
-m "Run ID: ${{ github.run_id }}"

Expand All @@ -68,6 +73,7 @@ jobs:
}

git push origin main
gh workflow run deploy.yml --ref main

- name: Report no changes
if: steps.git-check.outputs.changes != 'true'
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/write-tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: write
actions: write

jobs:
deploy:
Expand Down Expand Up @@ -47,6 +48,8 @@ jobs:

- name: Commit generated files
if: steps.git-check.outputs.changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
Expand All @@ -55,7 +58,7 @@ jobs:
git add .gitattributes 2>/dev/null || true
git add loadedVectorStore/*.json loadedVectorStore/*.index 2>/dev/null || true
git add -A
git commit -m "chore: update generated tutorials [skip ci]" \
git commit -m "chore: update generated tutorials" \
-m "Automated update from write-tutorials workflow" \
-m "Run ID: ${{ github.run_id }}"
git pull --rebase origin main || {
Expand All @@ -65,6 +68,7 @@ jobs:
exit 1
}
git push origin main
gh workflow run deploy.yml --ref main

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Trigger deploys for tutorial checkpoint commits

Fresh evidence for a remaining GITHUB_TOKEN path is that scripts/generate_tutorials.mjs commits and git push origin main -f every 100 generated tutorials before this step. If a run ends on one of those checkpoints (for example exactly 100 or 200 new tutorials), git-check reports no changes, so this conditional step—and this workflow_dispatch—is skipped; GitHub documents that non-dispatch events created with GITHUB_TOKEN do not create workflow runs (https://docs.github.com/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow), leaving that generated tutorial commit undeployed.

Useful? React with 👍 / 👎.

working-directory: ./

- name: Report no changes
Expand Down
Loading