diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4feba5c1..71b5c3e4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -453,7 +453,7 @@ jobs: load: false file: ./Dockerfile${{ matrix.dockerfile }} platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/386 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'publishImage') }} target: with-fhem-extended-python-nodejs cache-from: | type=gha,scope=base-cpan_linux/386-${{ matrix.dockerfile }} @@ -500,7 +500,7 @@ jobs: load: false file: ./Dockerfile${{ matrix.dockerfile }} platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64,386 - push: ${{ github.event_name != 'pull_request' }} + push: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'publishImage') }} target: with-fhem cache-from: | type=gha,scope=base_linux/arm64-${{ matrix.dockerfile }} diff --git a/.github/workflows/prepare-docker/action.yml b/.github/workflows/prepare-docker/action.yml index 18537f29..0cba87fe 100644 --- a/.github/workflows/prepare-docker/action.yml +++ b/.github/workflows/prepare-docker/action.yml @@ -38,14 +38,14 @@ runs: uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - if: github.event_name != 'pull_request' && inputs.DOCKER_HUB_USERNAME != null && inputs.DOCKER_HUB_ACCESS_TOKEN != null + if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'publishImage') ) && inputs.DOCKER_HUB_USERNAME != null && inputs.DOCKER_HUB_ACCESS_TOKEN != null uses: docker/login-action@v3 with: username: ${{ inputs.DOCKER_HUB_USERNAME }} password: ${{ inputs.DOCKER_HUB_ACCESS_TOKEN }} - name: Login to GitHub Container Registry - if: github.event_name != 'pull_request' && inputs.GHCR_OWNER != null && inputs.GHCR_ACCESS_TOKEN != null + if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'publishImage') ) && inputs.GHCR_OWNER != null && inputs.GHCR_ACCESS_TOKEN != null uses: docker/login-action@v3 with: registry: ghcr.io diff --git a/Dockerfile-bullseye b/Dockerfile-bullseye index 8c6a8a18..f6a585f4 100644 --- a/Dockerfile-bullseye +++ b/Dockerfile-bullseye @@ -2,7 +2,7 @@ # # base layer with perl and some general preparations # -FROM perl:5.36.3-slim-bullseye as base +FROM perl:5.36.3-slim-bullseye AS base ARG TARGETPLATFORM @@ -46,7 +46,7 @@ EOF # Install all CPAN Modules, needed from FHEM and standard modules # -FROM perl:5.36.3-bullseye as build-cpan +FROM perl:5.36.3-bullseye AS build-cpan COPY cpanfile /usr/src/app/core/cpanfile @@ -56,6 +56,7 @@ RUN < /image_info @@ -245,7 +248,7 @@ CMD [ "start" ] # Add additional Perl and System layers # -FROM with-fhem as with-fhem-extended +FROM with-fhem AS with-fhem-extended ENV PERL5LIB=${PERL5LIB}:/usr/src/app/3rdparty/lib/perl5 @@ -279,7 +282,7 @@ COPY --from=build-cpan /usr/src/app/3rdparty/lib/perl5 /usr/src/app/3rdparty/lib # Add additional Python layer # -FROM with-fhem-extended as with-fhem-extended-python +FROM with-fhem-extended AS with-fhem-extended-python RUN <