Skip to content

Commit

Permalink
ci(backend): Use Docker Buildx
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Nov 14, 2023
1 parent cdf785b commit 4fb0294
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/deploy-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
Expand Down

0 comments on commit 4fb0294

Please sign in to comment.