Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 8295d45

Browse files
committed
Add Bun Docker image and update release workflow
1 parent a7f20b7 commit 8295d45

File tree

3 files changed

+67
-15
lines changed

3 files changed

+67
-15
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,24 @@ jobs:
3131
steps:
3232
- name: Checkout repository
3333
uses: actions/checkout@v3
34+
3435
- name: Grab version info
3536
id: tag
36-
run: |
37-
REF=${GITHUB_REF##refs/tags/}
38-
echo "::set-output name=version::$REF"
37+
run: echo "version=${GITHUB_REF##refs/tags/}" >> $GITHUB_OUTPUT
38+
3939
- name: Setup Docker Buildx
4040
uses: docker/setup-buildx-action@v2
41-
with:
42-
# https://github.com/docker/build-push-action/issues/761
43-
driver-opts:
44-
image=moby/buildkit:v0.10.6
41+
4542
- name: Set up QEMU
4643
uses: docker/setup-qemu-action@v2
44+
4745
- name: Login into ghcr.io
4846
uses: docker/login-action@v2
4947
with:
5048
registry: ghcr.io
5149
username: auguwu
5250
password: ${{secrets.GITHUB_TOKEN}}
51+
5352
- name: Build and push!
5453
uses: docker/build-push-action@v4
5554
with:
@@ -68,29 +67,28 @@ jobs:
6867
needs: [base-image]
6968
strategy:
7069
matrix:
71-
image: [node, rust, java, golang, dotnet]
70+
image: [node, rust, java, golang, dotnet, bun]
7271
steps:
7372
- name: Checkout repository
7473
uses: actions/checkout@v3
74+
7575
- name: Grab version info
7676
id: tag
77-
run: |
78-
REF=${GITHUB_REF##refs/tags/}
79-
echo "::set-output name=version::$REF"
77+
run: echo "version=${GITHUB_REF##refs/tags/}" >> $GITHUB_OUTPUT
78+
8079
- name: Setup Docker Buildx
8180
uses: docker/setup-buildx-action@v2
82-
with:
83-
# https://github.com/docker/build-push-action/issues/761
84-
driver-opts:
85-
image=moby/buildkit:v0.10.6
81+
8682
- name: Set up QEMU
8783
uses: docker/setup-qemu-action@v2
84+
8885
- name: Login into ghcr.io
8986
uses: docker/login-action@v2
9087
with:
9188
registry: ghcr.io
9289
username: auguwu
9390
password: ${{secrets.GITHUB_TOKEN}}
91+
9492
- name: Build and push!
9593
uses: docker/build-push-action@v4
9694
with:

images/bun/Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# 💐💚 coder-images: Optimized, and easy Docker images and Coder templates to use in your everyday work!
2+
# Copyright (c) 2022-2023 Noel Towa <[email protected]>
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a copy
5+
# of this software and associated documentation files (the "Software"), to deal
6+
# in the Software without restriction, including without limitation the rights
7+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
# copies of the Software, and to permit persons to whom the Software is
9+
# furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in all
12+
# copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
# SOFTWARE.
21+
22+
FROM ghcr.io/auguwu/coder-images/base
23+
24+
ENV USERNAME=noel
25+
USER root
26+
ENV BUN_VERSION="0.6.10"
27+
28+
RUN set -eux; \
29+
arch="$(dpkg --print-architecture)"; \
30+
case "${arch}" in \
31+
aarch64|arm64) \
32+
BUN_DOWNLOAD_URL="https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-aarch64.zip"; \
33+
;; \
34+
amd64|x86_64) \
35+
BUN_DOWNLOAD_URL="https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip"; \
36+
;; \
37+
esac; \
38+
mkdir -p /opt/oven/bun; \
39+
curl -L "${BUN_DOWNLOAD_URL}" | bsdtar xf - --strip-components=1 -C /opt/oven/bun; \
40+
chmod +x /opt/oven/bun/bun
41+
42+
ENV PATH=$PATH:/opt/oven/bun
43+
USER ${USERNAME}
44+
45+
ENV PATH=$PATH:/opt/oven/bun

images/bun/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ghcr.io/auguwu/coder-images/bun
2+
This image extends from the [base image](https://github.com/auguwu/coder-images/pkgs/container/coder-images%2Fbase) that includes [Bun](https://bun.sh) to develop from.
3+
4+
## Bundled Software
5+
| Name | Description | Version |
6+
| ----- | ------------------------------------------------------------------------------------------ | -------------- |
7+
| `bun` | Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one | [v0.6.10][bun] |
8+
9+
[bun]: https://github.com/oven-sh/bun/releases/tag/bun-v0.6.10

0 commit comments

Comments
 (0)