Skip to content

Commit 235ff55

Browse files
committed
Merge branch 'dev' into feat/fork-session-take-2
2 parents 1357e27 + 1aade4b commit 235ff55

93 files changed

Lines changed: 2241 additions & 1306 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/setup-bun/action.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ description: "Setup Bun with caching and install dependencies"
33
runs:
44
using: "composite"
55
steps:
6+
- name: Mount Bun Cache
7+
uses: useblacksmith/stickydisk@v1
8+
with:
9+
key: ${{ github.repository }}-bun-cache
10+
path: ~/.bun
11+
612
- name: Setup Bun
713
uses: oven-sh/setup-bun@v2
814
with:
915
bun-version-file: package.json
1016

11-
- name: Cache ~/.bun
12-
id: cache-bun
13-
uses: actions/cache@v4
14-
with:
15-
path: ~/.bun
16-
key: ${{ runner.os }}-bun-${{ hashFiles('package.json') }}-${{ hashFiles('bun.lockb', 'bun.lock') }}
17-
restore-keys: |
18-
${{ runner.os }}-bun-${{ hashFiles('package.json') }}-
19-
2017
- name: Install dependencies
2118
run: bun install
2219
shell: bash
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "Setup Git Committer"
2+
description: "Create app token and configure git user"
3+
inputs:
4+
opencode-app-id:
5+
description: "OpenCode GitHub App ID"
6+
required: true
7+
opencode-app-secret:
8+
description: "OpenCode GitHub App private key"
9+
required: true
10+
outputs:
11+
token:
12+
description: "GitHub App token"
13+
value: ${{ steps.apptoken.outputs.token }}
14+
app-slug:
15+
description: "GitHub App slug"
16+
value: ${{ steps.apptoken.outputs.app-slug }}
17+
runs:
18+
using: "composite"
19+
steps:
20+
- name: Create app token
21+
id: apptoken
22+
uses: actions/create-github-app-token@v2
23+
with:
24+
app-id: ${{ inputs.opencode-app-id }}
25+
private-key: ${{ inputs.opencode-app-secret }}
26+
27+
- name: Configure git user
28+
run: |
29+
slug="${{ steps.apptoken.outputs.app-slug }}"
30+
git config --global user.name "${slug}[bot]"
31+
git config --global user.email "${slug}[bot]@users.noreply.github.com"
32+
shell: bash
33+
34+
- name: Clear checkout auth
35+
run: |
36+
git config --local --unset-all http.https://github.com/.extraheader || true
37+
shell: bash
38+
39+
- name: Configure git remote
40+
run: |
41+
git remote set-url origin https://x-access-token:${{ steps.apptoken.outputs.token }}@github.com/${{ github.repository }}
42+
shell: bash

.github/workflows/beta.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: beta
2+
3+
on:
4+
push:
5+
branches: [dev]
6+
pull_request:
7+
types: [opened, synchronize, labeled, unlabeled]
8+
9+
jobs:
10+
sync:
11+
if: |
12+
github.event_name == 'push' ||
13+
(github.event_name == 'pull_request' &&
14+
contains(github.event.pull_request.labels.*.name, 'contributor'))
15+
runs-on: blacksmith-4vcpu-ubuntu-2404
16+
permissions:
17+
contents: write
18+
pull-requests: write
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Bun
26+
uses: ./.github/actions/setup-bun
27+
28+
- name: Setup Git Committer
29+
id: setup-git-committer
30+
uses: ./.github/actions/setup-git-committer
31+
with:
32+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
33+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
34+
35+
- name: Sync beta branch
36+
env:
37+
GH_TOKEN: ${{ steps.setup-git-committer.outputs.token }}
38+
run: bun script/beta.ts

.github/workflows/close-stale-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Close stale PRs
1+
name: close-stale-prs
22

33
on:
44
workflow_dispatch:

.github/workflows/containers.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: containers
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
paths:
8+
- packages/containers/**
9+
- .github/workflows/containers.yml
10+
- package.json
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
packages: write
16+
17+
jobs:
18+
build:
19+
runs-on: blacksmith-4vcpu-ubuntu-2404
20+
env:
21+
REGISTRY: ghcr.io/${{ github.repository_owner }}
22+
TAG: "24.04"
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: ./.github/actions/setup-bun
27+
28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@v3
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Login to GHCR
35+
uses: docker/login-action@v3
36+
with:
37+
registry: ghcr.io
38+
username: ${{ github.repository_owner }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Build and push containers
42+
run: bun ./packages/containers/script/build.ts --push
43+
env:
44+
REGISTRY: ${{ env.REGISTRY }}
45+
TAG: ${{ env.TAG }}

.github/workflows/daily-issues-recap.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Daily Issues Recap
1+
name: daily-issues-recap
22

33
on:
44
schedule:

.github/workflows/daily-pr-recap.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Daily PR Recap
1+
name: daily-pr-recap
22

33
on:
44
schedule:

.github/workflows/docs-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs Update
1+
name: docs-update
22

33
on:
44
schedule:

.github/workflows/duplicate-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Duplicate Issue Detection
1+
name: duplicate-issues
22

33
on:
44
issues:

.github/workflows/generate.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- dev
7+
pull_request:
78
workflow_dispatch:
89

910
jobs:
@@ -15,14 +16,17 @@ jobs:
1516
steps:
1617
- name: Checkout repository
1718
uses: actions/checkout@v4
18-
with:
19-
token: ${{ secrets.GITHUB_TOKEN }}
20-
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
21-
ref: ${{ github.event.pull_request.head.ref || github.ref_name }}
2219

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

23+
- name: Setup git committer
24+
id: committer
25+
uses: ./.github/actions/setup-git-committer
26+
with:
27+
opencode-app-id: ${{ vars.OPENCODE_APP_ID }}
28+
opencode-app-secret: ${{ secrets.OPENCODE_APP_SECRET }}
29+
2630
- name: Generate
2731
run: ./script/generate.ts
2832

@@ -32,10 +36,8 @@ jobs:
3236
echo "No changes to commit"
3337
exit 0
3438
fi
35-
git config --local user.email "[email protected]"
36-
git config --local user.name "GitHub Action"
3739
git add -A
38-
git commit -m "chore: generate"
40+
git commit -m "chore: generate" --allow-empty
3941
git push origin HEAD:${{ github.ref_name }} --no-verify
4042
# if ! git push origin HEAD:${{ github.event.pull_request.head.ref || github.ref_name }} --no-verify; then
4143
# echo ""

0 commit comments

Comments
 (0)