Skip to content

Commit b20a310

Browse files
committed
sync
1 parent b5a039e commit b20a310

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ jobs:
6161
run: |
6262
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
6363
64+
- name: Login to GitHub Container Registry
65+
uses: docker/login-action@v3
66+
with:
67+
registry: ghcr.io
68+
username: ${{ github.repository_owner }}
69+
password: ${{ secrets.GITHUB_TOKEN }}
70+
6471
- name: Publish
6572
run: |
6673
./script/publish.ts

packages/opencode/script/publish.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,10 @@ if (!Script.preview) {
245245
await $`cd ./dist/homebrew-tap && git add opencode.rb`
246246
await $`cd ./dist/homebrew-tap && git commit -m "Update to v${Script.version}"`
247247
await $`cd ./dist/homebrew-tap && git push`
248+
249+
const image = "ghcr.io/sst/opencode"
250+
await $`docker build -t ${image}:${Script.version} .`
251+
await $`docker push ${image}:${Script.version}`
252+
await $`docker tag ${image}:${Script.version} ${image}:latest`
253+
await $`docker push ${image}:latest`
248254
}

0 commit comments

Comments
 (0)