Skip to content

Sync

Sync #11

name: Sync
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
sync:
runs-on: ubuntu-latest
env:
TARGET_BRANCH: ${{ github.ref_name }}
steps:
- name: Checkout selected branch
uses: actions/checkout@v4
with:
# Uses the branch selected in "Use workflow from"
ref: ${{ github.ref }}
fetch-depth: 0
submodules: recursive
- name: Ensure submodules
run: |
git submodule sync --recursive
git submodule update --init --recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Run sync script (defaults to full mode)
env:
SYNC_GENERATE: full
SYNC_VERBOSE: '0'
SYNC_TS_SYMLINK: '1'
SYNC_TS_SYMLINK_CLEAN: '1'
run: |
chmod +x scripts/sync-internal.sh
./scripts/sync-internal.sh
- name: Create PR with changes
uses: peter-evans/create-pull-request@v7
with:
commit-message: "chore(sync): mirror internal packages into pkg/ (auto)"
title: "chore(sync): mirror internal packages into pkg/"
body: |
Automated synchronization from microsoft/typescript-go:
- Copy internal -> pkg
- Rewrite imports and normalize //go:generate
- Copy testdata -> testdata
- go mod tidy
This PR was created by the Sync Internal workflow.
base: ${{ env.TARGET_BRANCH }}
branch: chore/sync-internal
branch-suffix: timestamp
delete-branch: true
signoff: false
labels: |
chore
automated
draft: false