From e4c557fbd7b5570a0cb3c08a87730fb1d3a8157f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Tue, 23 Jan 2024 13:31:54 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BD=BF=E7=94=A8=20actions=20?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 29 ++++++++++++++++++++++++++++- Dockerfile | 8 ++------ VERSION | 2 +- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d64112f..559782c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,4 +32,31 @@ jobs: run: | gh release create ${{ steps.get-version.outputs.version }} --notes "Release ${{ steps.get-version.outputs.version }}" env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + file: Dockerfile + platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/mips64le + push: true + tags: | + jumpserver/web-static:${{ steps.get-version.outputs.version }}-bookworm + ghcr.io/jumpserver/web-static:${{ steps.get-version.outputs.version }}-bookworm \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e1301cc..f70a29e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,9 @@ -FROM debian:bullseye-slim +FROM debian:bookworm-slim ARG TARGETARCH LABEL org.opencontainers.image.source https://github.com/jumpserver/web-static -ARG APT_MIRROR=http://mirrors.ustc.edu.cn -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=web \ - sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \ - && rm -f /etc/cron.daily/apt-compat \ - && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ +RUN set -ex \ && apt-get update \ && apt-get install -y --no-install-recommends wget ca-certificates \ && echo "no" | dpkg-reconfigure dash \ diff --git a/VERSION b/VERSION index 80e0d76..e876398 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v1.0.5 +v1.0.6