Skip to content

Commit

Permalink
Docker BuildX FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
nagstler committed Apr 25, 2024
1 parent f22dcaf commit 16b6e15
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/server-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,30 @@ env:
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
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin

uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker image
run: |
docker build -t ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} -t ${{ env.IMAGE_NAME }}:${{ github.sha }} -f server/Dockerfile ./server
docker push ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
docker push ${{ env.IMAGE_NAME }}:${{ github.sha }}
uses: docker/build-push-action@v2
with:
context: ./server
file: ./server/Dockerfile
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
${{ env.IMAGE_NAME }}:${{ github.sha }}
platforms: linux/amd64,linux/arm64

0 comments on commit 16b6e15

Please sign in to comment.