From 7c0133e1849ee5fe2ab0868df83fb3d417cbaa15 Mon Sep 17 00:00:00 2001 From: Theo Sun Date: Wed, 29 May 2024 08:15:07 +0800 Subject: [PATCH] chore: update --- .github/workflows/docker-daily.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/docker-daily.yml diff --git a/.github/workflows/docker-daily.yml b/.github/workflows/docker-daily.yml new file mode 100644 index 0000000..07e0721 --- /dev/null +++ b/.github/workflows/docker-daily.yml @@ -0,0 +1,40 @@ +name: docker-daily-release + +on: + push: + branches: + - "main" + workflow_dispatch: + +jobs: + deploy-daily: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + # https://github.com/docker/setup-qemu-action#usage + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + # https://github.com/marketplace/actions/docker-setup-buildx + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # https://github.com/docker/login-action#docker-hub + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # https://github.com/docker/build-push-action#multi-platform-image + - name: Build and push to Docker Hub + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + platforms: linux/amd64 + push: true + tags: | + ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPOSITORY }}:latest