mirror of
https://github.com/Cacti/cacti.git
synced 2026-11-02 10:07:22 +09:00
* ci: copy pinned CI images to GHCR - Service containers pull before any step runs, so the registry mirror cannot help them; a digest-preserving copy under ghcr.io/cacti/ci-images lets jobs pull with GITHUB_TOKEN. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * ci: pull database and Rocky Linux images from GHCR Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: Rocky Linux compatibility
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "17 3 * * 6"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: rocky-linux-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
rocky-linux:
|
|
name: Rocky Linux 9 PHP compatibility
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 30
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
steps:
|
|
- name: Check out source
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Log in to GHCR
|
|
env:
|
|
GHCR_USER: ${{ github.actor }}
|
|
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: printf '%s' "$GHCR_TOKEN" | docker login ghcr.io --username "$GHCR_USER" --password-stdin
|
|
|
|
- name: Run PHP checks in Rocky Linux 9
|
|
run: |
|
|
set -euo pipefail
|
|
docker run --rm \
|
|
--volume "$GITHUB_WORKSPACE:/workspace:ro" \
|
|
--workdir /workspace \
|
|
ghcr.io/cacti/ci-images/rockylinux:9@sha256:d7be1c094cc5845ee815d4632fe377514ee6ebcf8efaed6892889657e5ddaaa6 \
|
|
bash -euo pipefail -c '
|
|
dnf -y module enable php:8.3
|
|
dnf -y install php-cli php-common php-curl php-gd php-intl php-mbstring php-mysqlnd php-xml php-zip
|
|
php --version
|
|
php -r '\''exit(version_compare(PHP_VERSION, "8.3.0", ">=") ? 0 : 1);'\''
|
|
find . \( -path ./vendor -o -path ./include/vendor \) -prune -o -type f -name "*.php" -print0 | xargs -0 -r -n1 php -l
|
|
'
|