From b55a8f878d804380667e68496adc0de1a32ff755 Mon Sep 17 00:00:00 2001 From: liangliang Date: Wed, 7 Jul 2021 17:22:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9docker=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 6 +++++ .github/workflows/publish-release.yml | 38 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/publish-release.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ef81490..75d68a4 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -30,4 +30,10 @@ jobs: with: context: . push: true + platforms: | + linux/amd64 + linux/arm64 + linux/arm/v7 + linux/arm/v6 + linux/386 tags: liangliangyy/djangoblog:latest diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml new file mode 100644 index 0000000..0f1c410 --- /dev/null +++ b/.github/workflows/publish-release.yml @@ -0,0 +1,38 @@ +name: publish release + +on: + release: + types: [published] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + 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: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true + platforms: | + linux/amd64 + linux/arm64 + linux/arm/v7 + linux/arm/v6 + linux/386 + tags: liangliangyy/djangoblog:${{ steps.release_version.outputs.tag }}