From 9d3c9c00b6fe7d29185b5961ccd26b5034b0c7be Mon Sep 17 00:00:00 2001 From: Church13 Date: Sat, 7 Oct 2023 11:22:08 -0600 Subject: [PATCH 1/4] Add php8.2 version of container --- .github/workflows/docker-php8.2.yml | 69 +++++++++++++++++++++++++++++ .gitignore | 1 + php8.2/Dockerfile | 12 +++++ 3 files changed, 82 insertions(+) create mode 100644 .github/workflows/docker-php8.2.yml create mode 100644 .gitignore create mode 100644 php8.2/Dockerfile diff --git a/.github/workflows/docker-php8.2.yml b/.github/workflows/docker-php8.2.yml new file mode 100644 index 0000000..51ff846 --- /dev/null +++ b/.github/workflows/docker-php8.2.yml @@ -0,0 +1,69 @@ +name: Docker + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +on: + schedule: + - cron: '15 15 * * 1' + push: + branches: [ main ] + # Publish semver tags as releases. + pull_request: + branches: [ main ] + workflow_dispatch: + +env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }} + + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Copy custom.ini into container + run: | + cp custom.ini ./php8.2/custom.ini + + # Login against a Docker registry except on PR + # https://github.com/docker/login-action + - name: Log into registry ${{ env.REGISTRY }} + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + # Extract metadata (tags, labels) for Docker + # https://github.com/docker/metadata-action + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + php8.2 + + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: ./php8.2/ + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/php8.2/Dockerfile b/php8.2/Dockerfile new file mode 100644 index 0000000..88085b9 --- /dev/null +++ b/php8.2/Dockerfile @@ -0,0 +1,12 @@ +FROM wordpress:php8.2 + +RUN pecl install redis && \ + docker-php-ext-enable redis + +RUN apt-get update && apt-get install -y libxml2-dev + +RUN docker-php-ext-install soap + +COPY custom.ini $PHP_INI_DIR/conf.d/ + +USER www-data:www-data From d4fb1563e643b36bff3f7942b4528cc8d994f992 Mon Sep 17 00:00:00 2001 From: Church13 Date: Sat, 7 Oct 2023 11:23:29 -0600 Subject: [PATCH 2/4] fix yml in workflow --- .github/workflows/docker-php8.2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-php8.2.yml b/.github/workflows/docker-php8.2.yml index 51ff846..64413f7 100644 --- a/.github/workflows/docker-php8.2.yml +++ b/.github/workflows/docker-php8.2.yml @@ -56,7 +56,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - php8.2 + php8.2 # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action From 5b657f4030a9097e4bdaa3b63bff8916bdef0a07 Mon Sep 17 00:00:00 2001 From: Church13 Date: Sat, 7 Oct 2023 11:27:01 -0600 Subject: [PATCH 3/4] try 2 to fix yml --- .github/workflows/docker-php8.2.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker-php8.2.yml b/.github/workflows/docker-php8.2.yml index 64413f7..cc74dde 100644 --- a/.github/workflows/docker-php8.2.yml +++ b/.github/workflows/docker-php8.2.yml @@ -56,14 +56,14 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - php8.2 + php8.2 - # Build and push Docker image with Buildx (don't push on PR) - # https://github.com/docker/build-push-action - - name: Build and push Docker image - uses: docker/build-push-action@v2 - with: - context: ./php8.2/ + # Build and push Docker image with Buildx (don't push on PR) + # https://github.com/docker/build-push-action + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: ./php8.2/ push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 30157fd935f7d8229863e1e6023c1261f178ef94 Mon Sep 17 00:00:00 2001 From: Church13 Date: Sat, 7 Oct 2023 11:36:47 -0600 Subject: [PATCH 4/4] update github actions --- .github/workflows/docker-php8.0.yml | 8 ++++---- .github/workflows/docker-php8.2.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-php8.0.yml b/.github/workflows/docker-php8.0.yml index 0c5b525..78f8115 100644 --- a/.github/workflows/docker-php8.0.yml +++ b/.github/workflows/docker-php8.0.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Copy custom.ini into container run: | @@ -42,7 +42,7 @@ jobs: # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -61,7 +61,7 @@ jobs: # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./php8.0/ push: ${{ github.event_name != 'pull_request' }} diff --git a/.github/workflows/docker-php8.2.yml b/.github/workflows/docker-php8.2.yml index cc74dde..a8761aa 100644 --- a/.github/workflows/docker-php8.2.yml +++ b/.github/workflows/docker-php8.2.yml @@ -32,7 +32,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Copy custom.ini into container run: | @@ -42,7 +42,7 @@ jobs: # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -52,7 +52,7 @@ jobs: # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | @@ -61,7 +61,7 @@ jobs: # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: ./php8.2/ push: ${{ github.event_name != 'pull_request' }}