diff --git a/.github/workflows/deploy-backend.yml b/.github/workflows/deploy-backend.yml index eb8a77f10..288c18bff 100644 --- a/.github/workflows/deploy-backend.yml +++ b/.github/workflows/deploy-backend.yml @@ -22,16 +22,24 @@ jobs: - name: Set Deployment Options id: deployment run: ./.github/workflows/deploy.sh - - name: Build the Backend Docker Image - uses: whoan/docker-build-with-cache-action@v6 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} registry: ${{ secrets.DOCKER_REGISTRY }} - image_name: fulib/fulib.org-backend - image_tag: ${{ steps.deployment.outputs.tag }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v5 + with: context: backend/ - build_extra_args: --build-arg VERSION=${{ steps.deployment.outputs.version }} + push: true + tags: fulib/fulib.org-backend:${{ steps.deployment.outputs.tag }} + build-args: | + VERSION=${{ steps.deployment.outputs.version }} + cache-to: type=gha,mode=max + cache-from: type=gha - name: Deploy the Backend to Rancher uses: sekassel-research/actions-rancher-update@2.0.2 with: