Skip to content

composer: bump phpmailer/phpmailer from 6.12.0 to 7.0.2 in /app/full #100

composer: bump phpmailer/phpmailer from 6.12.0 to 7.0.2 in /app/full

composer: bump phpmailer/phpmailer from 6.12.0 to 7.0.2 in /app/full #100

Workflow file for this run

name: Container Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
smoke-test:
runs-on: ubuntu-latest
strategy:
matrix:
variant: [ci, ci-full]
include:
- variant: ci
name: minimal
- variant: ci-full
name: full
name: smoke-test (${{ matrix.name }})
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build test image
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6
with:
targets: ${{ matrix.variant }}
load: true
- name: Test phpbu version
run: |
docker run --rm phpbu:${{ matrix.variant }} --version
docker run --rm phpbu:${{ matrix.variant }} --version | grep -E "^phpbu [0-9]+\.[0-9]+\.[0-9]+"
- name: Test phpbu help
run: docker run --rm phpbu:${{ matrix.variant }} --help | grep -q "backup"
- name: Test non-root user
run: |
USER=$(docker run --rm --entrypoint id phpbu:${{ matrix.variant }} -u)
test "$USER" = "1000" || (echo "Expected UID 1000, got $USER" && exit 1)
- name: Test TZ environment variable
run: |
# Verify entrypoint handles TZ without error
docker run --rm -e TZ=Europe/Berlin phpbu:${{ matrix.variant }} --version
# Verify PHP timezone is actually applied via entrypoint
docker run --rm -e TZ=Europe/Berlin --entrypoint sh phpbu:${{ matrix.variant }} -c '
# Simulate entrypoint TZ logic
if printf "%s" "$TZ" | grep -Eq "^[A-Za-z0-9/_+.-]+$"; then
printf "date.timezone = %s\n" "$TZ" > /usr/local/etc/php/conf.d/tz.ini
fi
php -r "echo date_default_timezone_get();"
' | grep -q "Europe/Berlin"
# Verify invalid TZ is rejected (injection attempt)
docker run --rm -e 'TZ=UTC;auto_prepend_file=/tmp/evil.php' phpbu:${{ matrix.variant }} --version 2>&1 | grep -q "Invalid TZ"
- name: Test read-only filesystem compatibility
run: |
docker run --rm --read-only --tmpfs /tmp:mode=1777 phpbu:${{ matrix.variant }} --version
- name: Test simulate mode
run: |
# Create a simple test config without external adapters
cat > /tmp/test-config.json <<'EOF'
{
"verbose": true,
"backups": [
{
"name": "Test backup",
"source": {
"type": "tar",
"options": {
"path": "/app"
}
},
"target": {
"dirname": "/backups",
"filename": "test-%Y%m%d.tar"
}
}
]
}
EOF
mkdir -p /tmp/backups
# Set ownership for phpbu user (UID 1000) - matches container user
sudo chown 1000:1000 /tmp/backups
docker run --rm \
-v /tmp/test-config.json:/config/backup.json:ro \
-v /tmp/backups:/backups \
phpbu:${{ matrix.variant }} \
--configuration=/config/backup.json \
--simulate
- name: Test full variant extras
if: matrix.variant == 'ci-full'
run: |
echo "Testing additional tools in full variant..."
docker run --rm --entrypoint which phpbu:ci-full rsync
docker run --rm --entrypoint which phpbu:ci-full gpg
docker run --rm --entrypoint which phpbu:ci-full ssh
structure-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
- name: Build test image
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6
with:
targets: ci
load: true
- name: Install container-structure-test
run: |
curl -LO https://github.com/GoogleContainerTools/container-structure-test/releases/download/v1.19.3/container-structure-test-linux-amd64
echo "fa0fa333bb6ba5c14065e7468d2904f5c82d021d7e1c763c9a45c5f2fbe9ff5f container-structure-test-linux-amd64" | sha256sum -c -
chmod +x container-structure-test-linux-amd64
sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
- name: Run structure tests
run: container-structure-test test --image phpbu:ci --config tests/container-structure-test.yaml