-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #331 from jumpserver/dev
v4.0.0
- Loading branch information
Showing
55 changed files
with
4,000 additions
and
2,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,65 @@ | ||
name: "Run Build Test" | ||
on: | ||
push: | ||
branches: | ||
- pr@* | ||
- repr@* | ||
paths: | ||
- 'Dockerfile' | ||
- 'Dockerfile*' | ||
- 'Dockerfile-*' | ||
- 'go.mod' | ||
- 'go.sum' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
component: [lion] | ||
version: [v4] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: docker/setup-qemu-action@v3 | ||
- uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Prepare Mirror | ||
- name: Prepare Build | ||
run: | | ||
sed -i '[email protected]@registry.yarnpkg.com@g' ui/yarn.lock | ||
sed -i '[email protected]/@@g' Dockerfile | ||
sed -i 's@^FROM registry.fit2cloud.com/jumpserver@FROM ghcr.io/jumpserver@g' Dockerfile | ||
sed -i 's@^FROM registry.fit2cloud.com/jumpserver@FROM ghcr.io/jumpserver@g' Dockerfile-ee | ||
- name: Build Image | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build CE Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: false | ||
push: true | ||
file: Dockerfile | ||
tags: jumpserver/lion:test | ||
tags: ghcr.io/jumpserver/${{ matrix.component }}:${{ matrix.version }}-ce | ||
platforms: linux/amd64 | ||
build-args: | | ||
VERSION=${{ matrix.version }} | ||
GOPROXY=direct | ||
APT_MIRROR=http://deb.debian.org | ||
NPM_REGISTRY=https://registry.yarnpkg.com | ||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Build EE Image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: false | ||
file: Dockerfile-ee | ||
tags: ghcr.io/jumpserver/${{ matrix.component }}:${{ matrix.version }} | ||
platforms: linux/amd64 | ||
build-args: | | ||
VERSION=${{ matrix.version }} | ||
APT_MIRROR=http://deb.debian.org | ||
outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ARG VERSION | ||
|
||
FROM registry.fit2cloud.com/jumpserver/lion:${VERSION}-ce | ||
ARG TARGETARCH | ||
|
||
ARG DEPENDENCIES=" \ | ||
curl \ | ||
iputils-ping \ | ||
telnet \ | ||
vim \ | ||
wget" | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=lion \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=lion \ | ||
set -ex \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends ${DEPENDENCIES} |
Oops, something went wrong.