Unify build and push actions

This commit is contained in:
Eugene Burmakin 2025-02-05 20:47:12 +01:00
parent b30cdee89a
commit e6faa8e4b8

View file

@ -19,10 +19,10 @@ jobs:
with:
ref: ${{ github.event.inputs.branch || github.ref_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
@ -59,24 +59,13 @@ jobs:
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Build and push (arm64)
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/Dockerfile.dev
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
platforms: linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-arm64
- name: Build and push (other architectures)
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile.dev
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new