Sync From Public Release #1058
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 From Public Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: "Explicit BrowserBox tag to sync (must have a successful public saga)" | |
| required: false | |
| type: string | |
| schedule: | |
| - cron: "17 * * * *" | |
| repository_dispatch: | |
| types: | |
| - browserbox_release_ready | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: sync-from-public-release | |
| cancel-in-progress: false | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Resolve tag override | |
| id: tag | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| tag="" | |
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | |
| tag="${{ inputs.tag }}" | |
| elif [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then | |
| tag="${{ github.event.client_payload.tag }}" | |
| fi | |
| echo "tag=${tag}" >> "$GITHUB_OUTPUT" | |
| - name: Sync package surfaces | |
| env: | |
| BROWSERBOX_TAG: ${{ steps.tag.outputs.tag }} | |
| run: node ./scripts/sync-release.mjs | |
| - name: Commit synced state | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if git diff --quiet; then | |
| echo "No package changes detected." | |
| exit 0 | |
| fi | |
| tag="$(jq -r '.tag' packages/release/current-release.json)" | |
| git config user.name "BrowserBox Distribution Bot" | |
| git config user.email "noreply@browserbox.io" | |
| git add . | |
| git commit -m "Sync package surfaces to ${tag}" | |
| git push origin HEAD | |