From 24060767dded959d56e88ec275fa43e36140561f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E7=BA=B8=E5=BF=98=E5=BF=A7?= Date: Sat, 14 Sep 2024 14:20:05 +0800 Subject: [PATCH] build: github action push docker image --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ service/index.ts | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..df1473a8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci + +on: + push: + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v6 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: ikxin/kms-tools:latest diff --git a/service/index.ts b/service/index.ts index 9dcbc401..81ebe9d2 100644 --- a/service/index.ts +++ b/service/index.ts @@ -21,7 +21,7 @@ app.use(cors()) app.use( cron({ name: 'heartbeat', - pattern: Patterns.everyMinutes(10), + pattern: Patterns.everyMinutes(5), run: runCheck, }), )