From b0ab001153a2515c84ed871eaeea735bdd726b30 Mon Sep 17 00:00:00 2001 From: ffais Date: Thu, 10 Oct 2024 16:47:02 +0200 Subject: [PATCH] fix renovate config Signed-off-by: ffais --- .github/renovate-configs.json5 | 2 +- .github/workflows/build_push_image.yaml | 57 +++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build_push_image.yaml diff --git a/.github/renovate-configs.json5 b/.github/renovate-configs.json5 index d5a450b..497d20b 100644 --- a/.github/renovate-configs.json5 +++ b/.github/renovate-configs.json5 @@ -8,7 +8,7 @@ ], "helm": { "enabled": false - } + }, "dockerfile": { "fileMatch": ["(^|/|\.|\.*)([Dd]ocker|[Cc]ontainer)file$"] }, diff --git a/.github/workflows/build_push_image.yaml b/.github/workflows/build_push_image.yaml new file mode 100644 index 0000000..7bb42ac --- /dev/null +++ b/.github/workflows/build_push_image.yaml @@ -0,0 +1,57 @@ +name: build push + +on: + push: + branches: + - main + +env: + REGISTRY: ghcr.io + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - healthcheck + - redis + platform: + - linux/amd64 + - linux/arm/v6 + - linux/arm/v7 + - linux/arm64 + steps: + - name: Prepare + run: | + platform=${{ matrix.platform }} + echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV + + - name: Log in to the Container registry + uses: docker/login-action@v3.0.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY_IMAGE }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push by digest + id: build + uses: docker/build-push-action@v6 + with: + platforms: ${{ matrix.platform }} + file: dockerfiles/php-fpm-${{ matrix.version }}-Dockerfile + labels: ${{ steps.meta.outputs.labels }} + outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true