fix docker builds (#402)

This commit is contained in:
Saeed Vaziry 2024-12-23 17:29:51 +01:00 committed by GitHub
parent ea3d64607a
commit da1043185a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 9 deletions

View File

@ -1,9 +1,8 @@
name: Docker
name: Docker Latest
on:
push:
branches:
- 1.x
- 2.x
jobs:
@ -25,12 +24,11 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
- name: Build and push to the latest tag
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:${{ github.head_ref || github.ref_name }} \
--build-arg="RELEASE=0" \
-t vitodeploy/vito:latest \
--platform linux/amd64,linux/arm64 \
--no-cache \
--push

View File

@ -28,17 +28,24 @@ jobs:
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:${{ github.event.release.tag_name }} \
--build-arg="RELEASE=0" \
--platform linux/amd64,linux/arm64 \
--no-cache \
--push
- name: Build and push to the latest tag
- name: Build and push to the 1.x tag
if: startsWith(github.event.release.target_commitish, '1.x')
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:1.x \
--platform linux/amd64,linux/arm64 \
--push
- name: Build and push to the 2.x tag
if: startsWith(github.event.release.target_commitish, '2.x')
run: |
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:latest \
--build-arg="RELEASE=0" \
-t vitodeploy/vito:2.x \
--platform linux/amd64,linux/arm64 \
--push