summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/beta.yml
blob: d92133ea6a2f6fc3e7af0caed814dc62a3f69837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: beta

on:
  push:
    branches: [dev]
  pull_request:
    types: [opened, synchronize, labeled, unlabeled]

jobs:
  sync:
    if: |
      github.event_name == 'push' || 
      (github.event_name == 'pull_request' && 
       contains(github.event.pull_request.labels.*.name, 'contributor'))
    runs-on: blacksmith-4vcpu-ubuntu-2404
    permissions:
      contents: write
      pull-requests: read
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Bun
        uses: ./.github/actions/setup-bun

      - name: Configure Git
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"

      - name: Sync beta branch
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: bun script/beta.ts