fix: template sync #1
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
| 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]') | ||
| 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 }} | ||