Sync Beta #1
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 Beta | |
| on: | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: | |
| - Release | |
| types: | |
| - completed | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: sync-beta | |
| cancel-in-progress: false | |
| jobs: | |
| sync-beta: | |
| name: Sync beta from main | |
| if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' | |
| runs-on: ubuntu-latest | |
| env: | |
| HUSKY: 0 | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| ref: main | |
| token: ${{ secrets.SEMANTIC_RELEASE_TOKEN }} | |
| - name: Fast-forward beta | |
| run: | | |
| git fetch origin beta | |
| if ! git merge-base --is-ancestor origin/beta origin/main; then | |
| echo "beta has commits that are not in main; refusing to overwrite it." | |
| exit 1 | |
| fi | |
| git push origin origin/main:beta |