From 70c04f6866518fa9dec46fffc2d159426b849667 Mon Sep 17 00:00:00 2001 From: Yang Yang Date: Wed, 4 Nov 2020 00:45:22 +0800 Subject: [PATCH] tools: manual build (#767) --- .github/workflows/{ci.yml => auto-build.yml} | 4 +- .github/workflows/manual-build.yml | 58 ++++++++++++++++++++ 2 files changed, 59 insertions(+), 3 deletions(-) rename .github/workflows/{ci.yml => auto-build.yml} (93%) create mode 100644 .github/workflows/manual-build.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/auto-build.yml similarity index 93% rename from .github/workflows/ci.yml rename to .github/workflows/auto-build.yml index d1b1e7066..3b9f26113 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/auto-build.yml @@ -1,4 +1,4 @@ -name: ci +name: Auto Build on: push @@ -24,8 +24,6 @@ jobs: with: python-version: '3.9' architecture: 'x64' - - name: Show Python version - run: python -c "import sys; print(sys.version)" - name: Build and push run: tools/push -p linux/amd64 build-arm64: diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml new file mode 100644 index 000000000..e04b75643 --- /dev/null +++ b/.github/workflows/manual-build.yml @@ -0,0 +1,58 @@ +name: Manual Build + +on: + workflow_dispatch: + inputs: + images: + description: 'Images to build' + required: true + +jobs: + build-amd64: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + architecture: 'x64' + - name: Build and push + run: tools/push -p linux/amd64 ${{ github.event.inputs.images }} + build-arm64: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: '3.9' + architecture: 'x64' + - name: Show Python version + run: python -c "import sys; print(sys.version)" + - name: Build and push + run: tools/push -p linux/arm64 ${{ github.event.inputs.images }}