From ddacc32e643549d9ced69c6638a9832e28a5e125 Mon Sep 17 00:00:00 2001 From: Saeed Vaziry Date: Sat, 13 Apr 2024 13:19:20 +0200 Subject: [PATCH] docker release action --- .github/workflows/docker-release.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/docker-release.yml diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 0000000..fccf8e3 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,35 @@ +name: Build and push Docker image + +on: + release: + types: [created] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout code + 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 Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + run: | + docker buildx build . \ + -f docker/Dockerfile \ + -t vitodeploy/vito:${{ github.event.release.tag_name }} \ + -t vitodeploy/vito:latest \ + --build-arg="RELEASE=0" \ + --platform linux/amd64,linux/arm64 \ + --no-cache \ + --push