diff --git a/.github/workflows/build-image-debian.yaml b/.github/workflows/build-image-debian.yaml index 0c728ea..4cdd012 100644 --- a/.github/workflows/build-image-debian.yaml +++ b/.github/workflows/build-image-debian.yaml @@ -3,12 +3,12 @@ name: Build Debian Container Image on: pull_request: paths: + - ".github/**" - "debian/**" push: paths: + - ".github/**" - "debian/**" - branches: - - master env: REGISTRY_IMAGE: invoiceninja/invoiceninja-debian @@ -26,28 +26,17 @@ jobs: - name: Checkout uses: actions/checkout@v5 - - name: Prepare - run: | - platform=${{ matrix.platform }} - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV - - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 - - name: Build and push by digest + - name: Build id: build uses: docker/build-push-action@v6 with: @@ -55,53 +44,6 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} tags: ${{ env.REGISTRY_IMAGE }} - outputs: type=image,push-by-digest=true,name-canonical=true,push=true + outputs: type=image,push-by-digest=true,name-canonical=true cache-from: type=gha cache-to: type=gha,mode=max - - - name: Export digest - run: | - mkdir -p ${{ runner.temp }}/digests - digest="${{ steps.build.outputs.digest }}" - touch "${{ runner.temp }}/digests/${digest#sha256:}" - - - name: Upload digest - uses: actions/upload-artifact@v4 - with: - name: digests-${{ env.PLATFORM_PAIR }} - path: ${{ runner.temp }}/digests/* - if-no-files-found: error - retention-days: 1 - - merge: - runs-on: ubuntu-latest - needs: - - build - steps: - - name: Download digests - uses: actions/download-artifact@v4 - with: - path: ${{ runner.temp }}/digests - pattern: digests-* - merge-multiple: true - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY_IMAGE }} - - - name: Create manifest list and push (--dry-run) - working-directory: ${{ runner.temp }}/digests - run: | - docker buildx imagetools create --dry-run $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ - $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image-debian.yaml similarity index 100% rename from .github/workflows/publish-image.yaml rename to .github/workflows/publish-image-debian.yaml diff --git a/README.md b/README.md index c8537fa..8d959ac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Docker Image Size](https://img.shields.io/docker/image-size/invoiceninja/invoiceninja-debian?label=debian)](https://hub.docker.com/r/invoiceninja/invoiceninja-debian) [![Docker Pulls](https://img.shields.io/docker/pulls/invoiceninja/invoiceninja-debian)](https://hub.docker.com/r/invoiceninja/invoiceninja-debian) -[![Publish Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml) -[![Build Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml) +[![Publish Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-debian.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image-debian.yaml) +[![Build Status](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-debian.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-debian.yaml) # Debian Docker for [Invoice Ninja](https://www.invoiceninja.com/)