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 new file mode 100644 index 0000000..a8761aa --- /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@v3 + + - 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@v3 + 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@v5 + 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@v5 + 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