Skip to content

fix: template sync

fix: template sync #1

name: Sync template tag
on:
push:
branches:
- main
jobs:
sync-template:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
if: startsWith(github.event.head_commit.message, 'chore: release v') && contains(github.event.head_commit.message, ' [skip ci]')

Check failure on line 14 in .github/workflows/sync-template-tag.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sync-template-tag.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Extract version
id: version
run: |
MSG="${{ github.event.head_commit.message }}"
FIRST_LINE="${MSG%%$'\n'*}"
if [[ "$FIRST_LINE" =~ chore:\ release\ v([0-9]+\.[0-9]+\.[0-9]+)\ \[skip\ ci\] ]]; then
echo "version=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
else
echo "Version not found in commit message"
exit 1
fi
- name: Sync template and push tag
run: pnpm exec tsx tools/publish-template-tag.ts ${{ steps.version.outputs.version }}