mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-25 07:49:37 +02:00
Update backend-latest.yml
Add multi-build support
This commit is contained in:
parent
56f16ad254
commit
4c85f8601e
1 changed files with 14 additions and 9 deletions
23
.github/workflows/backend-latest.yml
vendored
23
.github/workflows/backend-latest.yml
vendored
|
@ -30,17 +30,22 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Build Docker image
|
||||
run: docker build -t $IMAGE_NAME:latest ./backend
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build Docker image and push to Docker Hub
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest
|
||||
context: ./backend
|
||||
|
||||
- name: Tag Docker image for GHCR
|
||||
run: docker tag $IMAGE_NAME:latest ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest
|
||||
|
||||
- name: Tag Docker image for Docker Hub
|
||||
run: docker tag $IMAGE_NAME:latest ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest
|
||||
run: docker tag ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest
|
||||
|
||||
- name: Push Docker image to GHCR
|
||||
run: docker push ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME:latest
|
||||
|
||||
- name: Push Docker image to Docker Hub
|
||||
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/$IMAGE_NAME:latest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue