diff --git a/.github/workflows/registry.yml b/.github/workflows/registry.yml index 0eaecb1..6e0ac3d 100644 --- a/.github/workflows/registry.yml +++ b/.github/workflows/registry.yml @@ -11,24 +11,24 @@ jobs: latest: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build latest version and publish to GitHub Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: name: mileschou/composer - tags: "latest,8.2" + tags: "latest,8.3" username: mileschou password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - dockerfile: 8.2/Dockerfile + dockerfile: 8.3/Dockerfile build: runs-on: ubuntu-latest strategy: matrix: - version: ["8.1", "8.0", "7.4", "7.3", "7.2", "7.1", "7.0", "5.6", "5.5"] + version: ["8.2", "8.1", "8.0", "7.4", "7.3", "7.2", "7.1", "7.0", "5.6", "5.5"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build PHP ${{ matrix.version }} and publish to GitHub Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: @@ -41,24 +41,24 @@ jobs: latest_v1: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build latest version and publish to GitHub Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: name: mileschou/composer - tags: "v1,8.2-v1" + tags: "v1,8.3-v1" username: mileschou password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io - dockerfile: 8.2/v1/Dockerfile + dockerfile: 8.3/v1/Dockerfile build_v1: runs-on: ubuntu-latest strategy: matrix: - version: ["8.1", "8.0", "7.4", "7.3", "7.2", "7.1", "7.0", "5.6"] + version: ["8.2", "8.1", "8.0", "7.4", "7.3", "7.2", "7.1", "7.0", "5.6"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build PHP ${{ matrix.version }} and publish to GitHub Registry uses: elgohr/Publish-Docker-Github-Action@v5 with: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d78238c..5d8738a 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -32,11 +32,11 @@ jobs: uses: mileschou/composer-action/7.2/install@master with: args: --help - php82_v1: + php83_v1: runs-on: ubuntu-latest steps: - name: Composer Action install test - uses: mileschou/composer-action/8.2/v1@master + uses: mileschou/composer-action/8.3/v1@master with: args: --help php_version: diff --git a/8.3/Dockerfile b/8.3/Dockerfile new file mode 100644 index 0000000..5b61b82 --- /dev/null +++ b/8.3/Dockerfile @@ -0,0 +1,31 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# +FROM php:8.3-alpine + +LABEL org.opencontainers.image.source="https://github.com/MilesChou/composer-action" \ + repository="https://github.com/MilesChou/composer-action" \ + maintainer="MilesChou " + +RUN set -xe && \ + apk add --no-cache \ + git \ + tini \ + unzip + +ENV COMPOSER_ALLOW_SUPERUSER=1 \ + COMPOSER_MEMORY_LIMIT=-1 \ + COMPOSER_HOME=/tmp \ + COMPOSER_PATH=/usr/bin/composer + +COPY --from=composer:2 /usr/bin/composer /usr/bin/composer + +COPY docker-entrypoint /usr/local/bin/docker-entrypoint + +WORKDIR /app + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] + +CMD ["composer"] diff --git a/8.3/docker-entrypoint b/8.3/docker-entrypoint new file mode 100755 index 0000000..cf9907b --- /dev/null +++ b/8.3/docker-entrypoint @@ -0,0 +1,26 @@ +#!/bin/sh + +# Ref https://github.com/composer/docker/blob/582c6f4e10b6b8fbf9bc1c5b02d6ec24694fe8d4/2.0/docker-entrypoint.sh + +isCommand() { + # Retain backwards compatibility with common CI providers, + # see: https://github.com/composer/docker/issues/107 + if [ "$1" = "sh" ]; then + return 1 + fi + + composer help "$1" > /dev/null 2>&1 +} + +# check if the first argument passed in looks like a flag +if [ "${1#-}" != "$1" ]; then + set -- /sbin/tini -- composer "$@" +# check if the first argument passed in is composer +elif [ "$1" = 'composer' ]; then + set -- /sbin/tini -- "$@" +# check if the first argument passed in matches a known command +elif isCommand "$1"; then + set -- /sbin/tini -- composer "$@" +fi + +exec "$@" diff --git a/8.3/install/Dockerfile b/8.3/install/Dockerfile new file mode 100644 index 0000000..fe0a691 --- /dev/null +++ b/8.3/install/Dockerfile @@ -0,0 +1,8 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# +FROM ghcr.io/mileschou/composer:8.3 + +CMD ["install"] diff --git a/8.3/v1/Dockerfile b/8.3/v1/Dockerfile new file mode 100644 index 0000000..aa07a42 --- /dev/null +++ b/8.3/v1/Dockerfile @@ -0,0 +1,36 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# +FROM php:8.3-alpine + +LABEL org.opencontainers.image.source="https://github.com/MilesChou/composer-action" \ + repository="https://github.com/MilesChou/composer-action" \ + maintainer="MilesChou " + +RUN set -xe && \ + apk add --no-cache \ + git \ + tini \ + unzip + +ENV COMPOSER_ALLOW_SUPERUSER=1 \ + COMPOSER_MEMORY_LIMIT=-1 \ + COMPOSER_HOME=/tmp \ + COMPOSER_PATH=/usr/bin/composer + +COPY --from=composer:1 /usr/bin/composer /usr/bin/composer + +RUN set -xe && \ + composer self-update --1 && \ + composer global require hirak/prestissimo && \ + composer clear-cache + +COPY docker-entrypoint /usr/local/bin/docker-entrypoint + +WORKDIR /app + +ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] + +CMD ["composer"] diff --git a/8.3/v1/docker-entrypoint b/8.3/v1/docker-entrypoint new file mode 100755 index 0000000..cf9907b --- /dev/null +++ b/8.3/v1/docker-entrypoint @@ -0,0 +1,26 @@ +#!/bin/sh + +# Ref https://github.com/composer/docker/blob/582c6f4e10b6b8fbf9bc1c5b02d6ec24694fe8d4/2.0/docker-entrypoint.sh + +isCommand() { + # Retain backwards compatibility with common CI providers, + # see: https://github.com/composer/docker/issues/107 + if [ "$1" = "sh" ]; then + return 1 + fi + + composer help "$1" > /dev/null 2>&1 +} + +# check if the first argument passed in looks like a flag +if [ "${1#-}" != "$1" ]; then + set -- /sbin/tini -- composer "$@" +# check if the first argument passed in is composer +elif [ "$1" = 'composer' ]; then + set -- /sbin/tini -- "$@" +# check if the first argument passed in matches a known command +elif isCommand "$1"; then + set -- /sbin/tini -- composer "$@" +fi + +exec "$@" diff --git a/8.3/v1/install/Dockerfile b/8.3/v1/install/Dockerfile new file mode 100644 index 0000000..c673a1b --- /dev/null +++ b/8.3/v1/install/Dockerfile @@ -0,0 +1,8 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# +FROM ghcr.io/mileschou/composer:8.3-v1 + +CMD ["install"] diff --git a/Dockerfile b/Dockerfile index 9609aee..5b61b82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM php:8.2-alpine +FROM php:8.3-alpine LABEL org.opencontainers.image.source="https://github.com/MilesChou/composer-action" \ repository="https://github.com/MilesChou/composer-action" \ diff --git a/install/Dockerfile b/install/Dockerfile index a3205d6..2b970df 100644 --- a/install/Dockerfile +++ b/install/Dockerfile @@ -3,6 +3,6 @@ # # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM mileschou/composer:8.2 +FROM mileschou/composer:8.3 CMD ["install"] diff --git a/update.sh b/update.sh index d5a0caf..154213e 100755 --- a/update.sh +++ b/update.sh @@ -10,7 +10,7 @@ generated_warning() { EOH } -LATEST_VERSION=8.2 +LATEST_VERSION=8.3 VERSIONS=" 7.2 @@ -19,6 +19,7 @@ VERSIONS=" 8.0 8.1 8.2 +8.3 " for version in ${VERSIONS}; do diff --git a/update_v1.sh b/update_v1.sh index 7f83b25..de1a0eb 100755 --- a/update_v1.sh +++ b/update_v1.sh @@ -10,7 +10,7 @@ generated_warning() { EOH } -LATEST_VERSION=8.2 +LATEST_VERSION=8.3 VERSIONS=" 7.2 @@ -19,6 +19,7 @@ VERSIONS=" 8.0 8.1 8.2 +8.3 " for version in ${VERSIONS}; do diff --git a/v1/Dockerfile b/v1/Dockerfile index 52f2f26..aa07a42 100644 --- a/v1/Dockerfile +++ b/v1/Dockerfile @@ -3,7 +3,7 @@ # # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM php:8.2-alpine +FROM php:8.3-alpine LABEL org.opencontainers.image.source="https://github.com/MilesChou/composer-action" \ repository="https://github.com/MilesChou/composer-action" \ diff --git a/v1/install/Dockerfile b/v1/install/Dockerfile index 75c100e..cab551f 100644 --- a/v1/install/Dockerfile +++ b/v1/install/Dockerfile @@ -3,6 +3,6 @@ # # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM mileschou/composer:8.2-v1 +FROM mileschou/composer:8.3-v1 CMD ["install"]