diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b0f094..77bb125 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,25 +31,24 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Grab version info id: tag - run: | - REF=${GITHUB_REF##refs/tags/} - echo "::set-output name=version::$REF" + run: echo "version=${GITHUB_REF##refs/tags/}" >> $GITHUB_OUTPUT + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 - with: - # https://github.com/docker/build-push-action/issues/761 - driver-opts: - image=moby/buildkit:v0.10.6 + - name: Set up QEMU uses: docker/setup-qemu-action@v2 + - name: Login into ghcr.io uses: docker/login-action@v2 with: registry: ghcr.io username: auguwu password: ${{secrets.GITHUB_TOKEN}} + - name: Build and push! uses: docker/build-push-action@v4 with: @@ -68,29 +67,28 @@ jobs: needs: [base-image] strategy: matrix: - image: [node, rust, java, golang, dotnet] + image: [node, rust, java, golang, dotnet, bun] steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Grab version info id: tag - run: | - REF=${GITHUB_REF##refs/tags/} - echo "::set-output name=version::$REF" + run: echo "version=${GITHUB_REF##refs/tags/}" >> $GITHUB_OUTPUT + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v2 - with: - # https://github.com/docker/build-push-action/issues/761 - driver-opts: - image=moby/buildkit:v0.10.6 + - name: Set up QEMU uses: docker/setup-qemu-action@v2 + - name: Login into ghcr.io uses: docker/login-action@v2 with: registry: ghcr.io username: auguwu password: ${{secrets.GITHUB_TOKEN}} + - name: Build and push! uses: docker/build-push-action@v4 with: diff --git a/images/bun/Dockerfile b/images/bun/Dockerfile new file mode 100644 index 0000000..f8630a1 --- /dev/null +++ b/images/bun/Dockerfile @@ -0,0 +1,45 @@ +# 💐💚 coder-images: Optimized, and easy Docker images and Coder templates to use in your everyday work! +# Copyright (c) 2022-2023 Noel Towa +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +FROM ghcr.io/auguwu/coder-images/base + +ENV USERNAME=noel +USER root +ENV BUN_VERSION="0.6.10" + +RUN set -eux; \ + arch="$(dpkg --print-architecture)"; \ + case "${arch}" in \ + aarch64|arm64) \ + BUN_DOWNLOAD_URL="https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-aarch64.zip"; \ + ;; \ + amd64|x86_64) \ + BUN_DOWNLOAD_URL="https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip"; \ + ;; \ + esac; \ + mkdir -p /opt/oven/bun; \ + curl -L "${BUN_DOWNLOAD_URL}" | bsdtar xf - --strip-components=1 -C /opt/oven/bun; \ + chmod +x /opt/oven/bun/bun + +ENV PATH=$PATH:/opt/oven/bun +USER ${USERNAME} + +ENV PATH=$PATH:/opt/oven/bun diff --git a/images/bun/README.md b/images/bun/README.md new file mode 100644 index 0000000..8dbb05a --- /dev/null +++ b/images/bun/README.md @@ -0,0 +1,9 @@ +# ghcr.io/auguwu/coder-images/bun +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. + +## Bundled Software +| Name | Description | Version | +| ----- | ------------------------------------------------------------------------------------------ | -------------- | +| `bun` | Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one | [v0.6.10][bun] | + +[bun]: https://github.com/oven-sh/bun/releases/tag/bun-v0.6.10