Skip to content

feat(autoreview): adopt upstream security hardening #108

feat(autoreview): adopt upstream security hardening

feat(autoreview): adopt upstream security hardening #108

name: Publish Skills
on:
push:
branches:
- main
paths:
- "skills/**"
- "scripts/skills/publish.sh"
- ".github/workflows/publish-skills.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
verify:
name: Verify repository
if: ${{ github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ubuntu-latest
timeout-minutes: 10
env:
TESSL_AUTO_UPDATE_INTERVAL_MINUTES: "0"
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
package-manager-cache: false
- name: Install verification dependencies
run: npm ci
- name: Run repository verification
run: npm run verify
review:
needs: verify
if: ${{ github.ref == 'refs/heads/main' && (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')) }}
runs-on: ubuntu-latest
environment:
name: release
env:
TESSL_AUTO_UPDATE_INTERVAL_MINUTES: "0"
TESSL_THRESHOLD: "90"
TESSL_TOKEN: ${{ secrets.TESSL_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: ".node-version"
package-manager-cache: false
- name: Review skills with authenticated Tessl
run: ./scripts/skills/review.sh
publish:
needs: review
if: ${{ github.ref == 'refs/heads/main' && (github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip ci]')) }}
runs-on: ubuntu-latest
environment:
name: release
concurrency:
group: publish-skills-${{ github.repository }}-main
cancel-in-progress: false
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Tessl
uses: tesslio/setup-tessl@25ec223fc0da33b41b8044ff5ab2b85235f4f91e # v2
with:
token: ${{ secrets.TESSL_TOKEN }}
- name: Authorize version-bump pushes
env:
GH_TOKEN: ${{ github.token }}
run: gh auth setup-git
- name: Publish changed plugins
env:
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
GITHUB_SHA: ${{ github.sha }}
TESSL_WORKSPACE: uinaf
TESSL_PUBLISH_ALL: ${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }}
run: ./scripts/skills/publish.sh
- name: Commit published plugin versions
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
env:
GH_TOKEN: ${{ github.token }}
run: |
if git diff --quiet -- skills; then
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add skills
git commit -m "chore: sync published plugin versions [skip ci]"
git push