Skip to content

Commit 9ada911

Browse files
authored
Merge pull request #31 from usherlabs/develop
Compat with Production stack
2 parents 4e2bd10 + 1e3eb6a commit 9ada911

File tree

4 files changed

+56
-5
lines changed

4 files changed

+56
-5
lines changed

.github/workflows/publish.yml

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ name: Publish
55
on:
66
push:
77
tags:
8-
- "v*"
8+
- 'v[0-9]*.[0-9]*.[0-9]*' # Matches semver tags in the format of v1.2.3
9+
- 'v[0-9]*.[0-9]*.[0-9]*-*' # Matches semver tags in the format of v1.2.3-beta
10+
11+
env:
12+
IMAGE_NAME: ghcr.io/usherlabs/cex-broker
913

1014
permissions:
1115
contents: read
16+
packages: write
1217
id-token: write
1318

1419
jobs:
15-
publish:
20+
publish-npm:
1621
runs-on: ubuntu-latest
1722

1823
steps:
@@ -50,4 +55,39 @@ jobs:
5055
run: bun run build
5156

5257
- name: Publish to npm
53-
run: npm publish --provenance --access public
58+
run: npm publish --provenance --access public
59+
60+
publish-docker:
61+
runs-on: ubuntu-latest
62+
needs: publish-npm
63+
steps:
64+
- name: Checkout repo
65+
uses: actions/checkout@v4
66+
67+
- name: Set up Docker Buildx
68+
uses: docker/setup-buildx-action@v3
69+
70+
- name: Log in to GitHub Container Registry
71+
uses: docker/login-action@v3
72+
with:
73+
registry: ghcr.io
74+
username: ${{ github.actor }}
75+
password: ${{ secrets.GITHUB_TOKEN }}
76+
77+
- name: Extract metadata
78+
id: meta
79+
uses: docker/metadata-action@v5
80+
with:
81+
images: ${{ env.IMAGE_NAME }}
82+
tags: |
83+
type=match,pattern=v(\d+\.\d+\.\d+.*),group=1
84+
85+
- name: Build and push Docker image
86+
uses: docker/build-push-action@v6
87+
with:
88+
context: .
89+
file: Dockerfile
90+
push: true
91+
tags: |
92+
${{ env.IMAGE_NAME }}:${{ fromJSON(steps.meta.outputs.json).tag-names[0] }}
93+
${{ env.IMAGE_NAME }}:latest

.sandbox/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN apt-get update -y \
66
&& apt-get install -y --no-install-recommends ca-certificates curl \
77
&& rm -rf /var/lib/apt/lists/*
88

9-
RUN bun install --global @usherlabs/cex-broker@0.2.5
9+
RUN bun install --global @usherlabs/cex-broker@0.2.6
1010

1111
COPY --chmod=0755 ./.sandbox/entrypoint.sh /entrypoint.sh
1212
ENTRYPOINT ["/entrypoint.sh"]

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM oven/bun:1.3
2+
3+
WORKDIR /app
4+
5+
RUN apt-get update -y \
6+
&& apt-get install -y --no-install-recommends ca-certificates curl \
7+
&& rm -rf /var/lib/apt/lists/*
8+
9+
RUN bun install --global @usherlabs/cex-broker@0.2.6
10+
11+
CMD ["cex-broker"]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@usherlabs/cex-broker",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "Unified gRPC API to CEXs by Usher Labs.",
55
"repository": {
66
"type": "git",

0 commit comments

Comments
 (0)