Automate nightly upstream catalog refresh and validated merging #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Tessl Review — runs on PRs that change any SKILL.md. | |
| # Docs: https://docs.tessl.io/distribute/review-and-publish-with-github-actions | |
| name: Tessl Review | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "**/SKILL.md" | |
| jobs: | |
| review: | |
| runs-on: ubuntu-latest | |
| env: | |
| TESSL_TOKEN: ${{ secrets.TESSL_TOKEN }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Skip Tessl Review without token | |
| if: env.TESSL_TOKEN == '' | |
| run: echo "::notice::Skipping Tessl Review because TESSL_TOKEN is not configured for this workflow context." | |
| - uses: tesslio/setup-tessl@v2 | |
| if: env.TESSL_TOKEN != '' | |
| with: | |
| token: ${{ env.TESSL_TOKEN }} | |
| - name: Run Tessl Review for changed skills | |
| if: env.TESSL_TOKEN != '' | |
| run: | | |
| set -euo pipefail | |
| git fetch --no-tags --depth=1 origin "${{ github.base_ref }}" | |
| mapfile -t changed_skills < <(git diff --name-only --diff-filter=ACMRT "origin/${{ github.base_ref }}"...HEAD -- "**/SKILL.md") | |
| if [ "${#changed_skills[@]}" -eq 0 ]; then | |
| echo "No SKILL.md changes detected." | |
| exit 0 | |
| fi | |
| for skill_path in "${changed_skills[@]}"; do | |
| skill_dir="$(dirname "$skill_path")" | |
| echo "Running Tessl Review for ${skill_dir}" | |
| tessl review run "$skill_dir" --json --threshold 0 | |
| done |