mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
测试
This commit is contained in:
parent
ac90b24607
commit
7b8ad601f8
74
.github/workflows/build_docker_image.yml
vendored
74
.github/workflows/build_docker_image.yml
vendored
|
@ -2,15 +2,8 @@ name: Build And Push Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "npm-debug"
|
||||||
- "develop"
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
schedule:
|
|
||||||
- cron: "00 20 * * *"
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -163,73 +156,8 @@ jobs:
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
cache-from: type=registry,ref=whyour/qinglong:cache
|
|
||||||
cache-to: type=registry,ref=whyour/qinglong:cache,mode=max
|
|
||||||
|
|
||||||
- name: Image digest
|
- name: Image digest
|
||||||
run: |
|
run: |
|
||||||
echo ${{ steps.docker_build.outputs.digest }}
|
echo ${{ steps.docker_build.outputs.digest }}
|
||||||
|
|
||||||
build310:
|
|
||||||
if: ${{ github.ref_name == 'master' }}
|
|
||||||
needs: build-static
|
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
packages: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: pnpm/action-setup@v3
|
|
||||||
with:
|
|
||||||
version: "8.3.1"
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
cache: "pnpm"
|
|
||||||
|
|
||||||
- name: Setup timezone
|
|
||||||
uses: szenius/set-timezone@v1.2
|
|
||||||
with:
|
|
||||||
timezoneLinux: Asia/Shanghai
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Build and push python3.10
|
|
||||||
id: docker_build_310
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
build-args: |
|
|
||||||
MAINTAINER=${{ github.repository_owner }}
|
|
||||||
QL_BRANCH=${{ github.ref_name }}
|
|
||||||
SOURCE_COMMIT=${{ github.sha }}
|
|
||||||
network: host
|
|
||||||
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/s390x,linux/386
|
|
||||||
context: .
|
|
||||||
file: ./docker/310.Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: whyour/qinglong:python3.10
|
|
||||||
cache-from: type=registry,ref=whyour/qinglong:cache-python3.10
|
|
||||||
cache-to: type=registry,ref=whyour/qinglong:cache-python3.10,mode=max
|
|
||||||
|
|
||||||
- name: Image digest
|
|
||||||
run: |
|
|
||||||
echo ${{ steps.docker_build_310.outputs.digest }}
|
|
||||||
|
|
|
@ -3,11 +3,11 @@ COPY package.json .npmrc pnpm-lock.yaml /tmp/build/
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk update \
|
&& apk update \
|
||||||
&& apk add nodejs npm git \
|
&& apk add nodejs npm git \
|
||||||
&& npm i -g pnpm@8.3.1 \
|
&& npm i -g pnpm@8.3.1 pm2 tsx \
|
||||||
&& cd /tmp/build \
|
&& cd /tmp/build \
|
||||||
&& pnpm install --prod
|
&& pnpm install --prod
|
||||||
|
|
||||||
FROM python:3.11-alpine3.18
|
FROM python:3.11-alpine
|
||||||
|
|
||||||
ARG QL_MAINTAINER="whyour"
|
ARG QL_MAINTAINER="whyour"
|
||||||
LABEL maintainer="${QL_MAINTAINER}"
|
LABEL maintainer="${QL_MAINTAINER}"
|
||||||
|
@ -72,6 +72,7 @@ RUN git clone --depth=1 -b ${QL_BRANCH} ${QL_URL} ${QL_DIR} \
|
||||||
&& rm -rf /static
|
&& rm -rf /static
|
||||||
|
|
||||||
COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/
|
COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/
|
||||||
|
COPY --from=builder /usr/local/lib/node_modules/. /usr/local/lib/node_modules/
|
||||||
|
|
||||||
WORKDIR ${QL_DIR}
|
WORKDIR ${QL_DIR}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user