diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 03194a2..1754352 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -109,11 +109,14 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Docker build and push - uses: docker/build-push-action@14487ce63c7a62a4a324b0bfb37086795e31c6c1 # v6.16.0 + uses: docker/bake-action@76f9fa3a758507623da19f6092dc4089a7e61592 # v6.6.0 with: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + files: | + ./docker-bake.hcl bookworm + cwd://${{ steps.meta.outputs.bake-file }} - name: Setup Helm uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 diff --git a/docker-bake.hcl b/docker-bake.hcl new file mode 100644 index 0000000..953d2e7 --- /dev/null +++ b/docker-bake.hcl @@ -0,0 +1,18 @@ +group "default" { + targets = [ "bookworm", "alpine" ] +} +target "_common" { + args = { + RUBY_VERSION = "3.4.3" + } +} + +target "bookworm" { + dockerfile = "./dockerfiles/bookworm.Dockerfile" + inherits = [ "_common" ] +} + +target "alpine" { + dockerfile = "./dockerfiles/alpine.Dockerfile" + inherits = [ "_common" ] +}