Refactor to fix pipeline

This commit is contained in:
Greyscale 2025-03-03 21:09:15 +01:00
parent 8f2f68b404
commit f5e6a041e0

View file

@ -74,12 +74,6 @@ 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:
@ -94,54 +88,12 @@ 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 }}"
cache-to: "${{ env.DOCKER_CACHE_TO }},scope=${{ matrix.variant }}-${{ matrix.version }}"
- name: "Validate build"
run: docker run --rm ghcr.io/benzine-framework/php:${{ matrix.variant }}-${{ matrix.version }} /usr/bin/install-report
validate-dive-report:
name: Run Dive
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 15
matrix:
variant:
- cli
- nginx
- apache
version:
# - "7.0"
# - "7.1"
# - "7.2"
# - "7.3"
# - "7.4"
# - "8.0"
# - "8.1"
- "8.2"
- "8.3"
steps:
- run: docker login ghcr.io -u ${{ github.repository_owner }} -p ${{ secrets.GITHUB_TOKEN }}
- name: "Pull Candidate Image"
run: docker pull ghcr.io/benzine-framework/php:${{ matrix.variant }}-${{ matrix.version }}
- name: "Generate Dive Config"
run: |
{
echo "rules:"
echo "lowestEfficiency: 0.95"
echo "highestWastedBytes: 20MB"
echo "highestUserWastedPercent: 0.20"
} > ${{ github.workspace }}/.dive-ci.yml
# Use Dive to inspect the image for junk
- name: "Dive"
uses: yuichielectric/dive-action@0.0.3
with:
image: ghcr.io/benzine-framework/php:${{ matrix.variant }}-${{ matrix.version }}
config-file: ${{ github.workspace }}/.dive-ci.yml
tags:
name: Vanity Tags
runs-on: ubuntu-latest