|
|
@ -1,26 +1,32 @@ |
|
|
|
name: "Run Build Test" |
|
|
|
name: "Run Build Test" |
|
|
|
on: |
|
|
|
on: |
|
|
|
push: |
|
|
|
push: |
|
|
|
branches: |
|
|
|
paths: |
|
|
|
- pr@* |
|
|
|
- 'Dockerfile' |
|
|
|
- repr@* |
|
|
|
- 'Dockerfile-*' |
|
|
|
|
|
|
|
- 'pyproject.toml' |
|
|
|
|
|
|
|
- 'poetry.lock' |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
build: |
|
|
|
build: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ubuntu-latest |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- uses: actions/checkout@v3 |
|
|
|
- uses: actions/checkout@v3 |
|
|
|
|
|
|
|
- uses: docker/setup-qemu-action@v3 |
|
|
|
|
|
|
|
- uses: docker/setup-buildx-action@v3 |
|
|
|
|
|
|
|
|
|
|
|
- uses: docker/setup-qemu-action@v2 |
|
|
|
- name: Check Dockerfile |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
test -f Dockerfile-ce || cp -f Dockerfile Dockerfile-ce |
|
|
|
|
|
|
|
|
|
|
|
- uses: docker/setup-buildx-action@v2 |
|
|
|
- name: Build CE Image |
|
|
|
|
|
|
|
uses: docker/build-push-action@v5 |
|
|
|
- uses: docker/build-push-action@v3 |
|
|
|
|
|
|
|
with: |
|
|
|
with: |
|
|
|
context: . |
|
|
|
context: . |
|
|
|
push: false |
|
|
|
push: false |
|
|
|
tags: jumpserver/core-ce:test |
|
|
|
|
|
|
|
file: Dockerfile-ce |
|
|
|
file: Dockerfile-ce |
|
|
|
|
|
|
|
tags: jumpserver/core-ce:test |
|
|
|
|
|
|
|
platforms: linux/amd64 |
|
|
|
build-args: | |
|
|
|
build-args: | |
|
|
|
APT_MIRROR=http://deb.debian.org |
|
|
|
APT_MIRROR=http://deb.debian.org |
|
|
|
PIP_MIRROR=https://pypi.org/simple |
|
|
|
PIP_MIRROR=https://pypi.org/simple |
|
|
@ -28,9 +34,22 @@ jobs: |
|
|
|
cache-from: type=gha |
|
|
|
cache-from: type=gha |
|
|
|
cache-to: type=gha,mode=max |
|
|
|
cache-to: type=gha,mode=max |
|
|
|
|
|
|
|
|
|
|
|
- uses: LouisBrunner/checks-action@v1.5.0 |
|
|
|
- name: Prepare EE Image |
|
|
|
if: always() |
|
|
|
run: | |
|
|
|
|
|
|
|
sed -i 's@^FROM registry.fit2cloud.com@# FROM registry.fit2cloud.com@g' Dockerfile-ee |
|
|
|
|
|
|
|
sed -i 's@^COPY --from=build-xpack@# COPY --from=build-xpack@g' Dockerfile-ee |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Build EE Image |
|
|
|
|
|
|
|
uses: docker/build-push-action@v5 |
|
|
|
with: |
|
|
|
with: |
|
|
|
token: ${{ secrets.GITHUB_TOKEN }} |
|
|
|
context: . |
|
|
|
name: Check Build |
|
|
|
push: false |
|
|
|
conclusion: ${{ job.status }} |
|
|
|
file: Dockerfile-ee |
|
|
|
|
|
|
|
tags: jumpserver/core-ee:test |
|
|
|
|
|
|
|
platforms: linux/amd64 |
|
|
|
|
|
|
|
build-args: | |
|
|
|
|
|
|
|
APT_MIRROR=http://deb.debian.org |
|
|
|
|
|
|
|
PIP_MIRROR=https://pypi.org/simple |
|
|
|
|
|
|
|
PIP_JMS_MIRROR=https://pypi.org/simple |
|
|
|
|
|
|
|
cache-from: type=gha |
|
|
|
|
|
|
|
cache-to: type=gha,mode=max |