From 9726c1290a865b47152a71256a2122966315eef5 Mon Sep 17 00:00:00 2001 From: Cassius0924 <2670226747@qq.com> Date: Fri, 8 Mar 2024 16:55:31 +0800 Subject: [PATCH] Create docker-image-on-release.yml --- .github/workflows/docker-image-on-release.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/docker-image-on-release.yml diff --git a/.github/workflows/docker-image-on-release.yml b/.github/workflows/docker-image-on-release.yml new file mode 100644 index 0000000..c5f2b60 --- /dev/null +++ b/.github/workflows/docker-image-on-release.yml @@ -0,0 +1,36 @@ +name: Build and Push Docker Image On Release + +on: + release: + types: + - published + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.0.0 + + - name: Docker Setup Buildx + uses: docker/setup-buildx-action@v3.1.0 + + - name: Docker Login + uses: docker/login-action@v3.0.0 + with: + username: cassius0924 + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5.2.0 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: true + tags: cassius0924/wechatter:${{ github.event.release.tag_name }}