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

perf: 使用 actions 自动构建 #15

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading