From 3e9ff7ab6861c09748480273e596114870717ecc Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 1 Jan 2024 15:27:23 +0800 Subject: [PATCH] test --- .github/workflows/build_docker_image.yml | 88 +++++++++++++++++++++++- docker/390.Dockerfile | 11 +++ 2 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 docker/390.Dockerfile diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index d32087953a8..d87c5f9387e 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: jobs: - build: + build-arm: runs-on: ubuntu-20.04 permissions: @@ -81,7 +81,7 @@ jobs: QL_BRANCH=${{ github.ref_name }} SOURCE_COMMIT=${{ github.sha }} network: host - platforms: linux/arm/v6,linux/arm/v7,linux/s390x + platforms: linux/arm/v6,linux/arm/v7 context: . file: ./docker/Dockerfile push: true @@ -92,3 +92,87 @@ jobs: - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} + + build-390: + runs-on: ubuntu-20.04 + + permissions: + packages: write + contents: read + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v2 + 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: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: | + ${{ github.repository }} + ghcr.io/${{ github.repository }} + # generate Docker tags based on the following events/attributes + # nightly, master, pr-2, 1.2.3, 1.2, 1 + flavor: | + latest=false + tags: | + type=schedule,pattern=nightly + type=edge + type=ref,event=pr + type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', 'master') }} + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + image: tonistiigi/binfmt:master + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + id: docker_build + 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/s390x + context: . + file: ./docker/390.Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + 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 + run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/docker/390.Dockerfile b/docker/390.Dockerfile new file mode 100644 index 00000000000..1471a34af52 --- /dev/null +++ b/docker/390.Dockerfile @@ -0,0 +1,11 @@ +FROM python:3.11-alpine as builder + +RUN apk add --no-cache file nodejs npm + +RUN which node + +RUN file $(which node) + +RUN node -v + +RUN npm -v