Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
perf: 使用 actions 自动构建
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Jan 23, 2024
1 parent 81f52c0 commit e4c557f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
29 changes: 28 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
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
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.0.5
v1.0.6

0 comments on commit e4c557f

Please sign in to comment.