From ff7bcd3107a9ba4c17863fe19dd0d4a3b9cc08e5 Mon Sep 17 00:00:00 2001 From: CJ Sun Date: Mon, 24 Apr 2023 16:45:38 +0800 Subject: [PATCH] Create docker-image.yml --- .github/workflows/docker-image.yml | 39 ++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..4dc3d0c --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,39 @@ +name: Docker Image CI + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + env: + DOCKER_REPO: suncj98/vlmcsd-docker + DOCKER_PLATFORMS: linux/amd64,linux/arm,linux/arm64 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Docker Metadata action + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ env.DOCKER_REPO }} + - name: Docker Setup QEMU + uses: docker/setup-qemu-action@v2 + - name: Docker Setup Buildx + uses: docker/setup-buildx-action@v2 + - name: Docker Login + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - name: Build and push Docker images + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + push: true + platforms: ${{ env.DOCKER_PLATFORMS }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}