From a677b98a37f010bd49e4fe0ce284997993715276 Mon Sep 17 00:00:00 2001 From: Matthew Baggett Date: Wed, 7 Aug 2024 12:32:29 +0200 Subject: [PATCH] Fixup --- .github/workflows/php.yml | 7 +++++++ .secrets.example | 5 +++++ Dockerfile | 1 + 3 files changed, 13 insertions(+) create mode 100644 .secrets.example diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 34bbe2c..5d3bfcf 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -74,6 +74,12 @@ jobs: ghcr_token: ${{ secrets.GITHUB_TOKEN }} docker_hub_user: matthewbaggett docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }} + - name: Login to registry + uses: docker/login-action@v2 + with: + registry: ${{ secrets.PRIVATE_REGISTRY }} + username: ${{ secrets.PRIVATE_REGISTRY_USER }} + password: ${{ secrets.PRIVATE_REGISTRY_TOKEN }} - uses: docker/build-push-action@v5 name: "Build: Build & Push" with: @@ -88,6 +94,7 @@ jobs: ghcr.io/benzine-framework/php:${{ matrix.variant }}-${{ matrix.version }} gone/php:${{ matrix.variant }}-${{ matrix.version }} benzine/php:${{ matrix.variant }}-${{ matrix.version }} + ${{ secrets.PRIVATE_REGISTRY }}/php:${{ matrix.variant }}-${{ matrix.version }} build-args: | ${{ steps.build_args.outputs.result }} cache-from: "${{ env.DOCKER_CACHE_FROM }},scope=${{ matrix.variant }}-${{ matrix.version }}" diff --git a/.secrets.example b/.secrets.example new file mode 100644 index 0000000..d2d2a0a --- /dev/null +++ b/.secrets.example @@ -0,0 +1,5 @@ +GITHUB_TOKEN= +DOCKER_HUB_TOKEN= +PRIVATE_REGISTRY_ENDPOINT=registry.example.org +PRIVATE_REGISTRY_USER= +PRIVATE_REGISTRY_TOKEN= \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8f90dce..a382416 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ LABEL maintainer="Matthew Baggett " \ ARG PHP_PACKAGES ARG COMPOSER_VERSION ENV COMPOSER_ALLOW_SUPERUSER=1 +ENV COMPOSER_HOME=/root/.composer COPY core/install-report.sh /usr/bin/install-report SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN echo "Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \