Compare commits
No commits in common. "763fc170413ef7330ac902d9cf808c562d10ada9" and "0e79599606a1d9f6e45ea9c4581eb0e56e591de8" have entirely different histories.
763fc17041
...
0e79599606
3 changed files with 32 additions and 62 deletions
|
|
@ -1,22 +0,0 @@
|
|||
# CI image: catthehacker/ubuntu:act-latest + PHP 8.4 + extensions + Composer
|
||||
# Used by .forgejo/workflows/ci.yml — built/pushed by .forgejo/workflows/ci-image.yml
|
||||
FROM catthehacker/ubuntu:act-latest
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN add-apt-repository -y ppa:ondrej/php \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
php8.4-cli \
|
||||
php8.4-pgsql \
|
||||
php8.4-mbstring \
|
||||
php8.4-xml \
|
||||
php8.4-dom \
|
||||
php8.4-intl \
|
||||
php8.4-pcov \
|
||||
&& update-alternatives --set php /usr/bin/php8.4 \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Composer (latest 2.x, static binary from official image)
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
name: Build CI Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- '.forgejo/ci/Dockerfile'
|
||||
- '.forgejo/workflows/ci-image.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.forgejo/ci/Dockerfile'
|
||||
- '.forgejo/workflows/ci-image.yml'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
|
||||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://data.forgejo.org/docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Forgejo Registry
|
||||
uses: https://data.forgejo.org/docker/login-action@v3
|
||||
with:
|
||||
registry: forge.lvl0.xyz
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: https://data.forgejo.org/docker/build-push-action@v5
|
||||
with:
|
||||
context: .forgejo/ci
|
||||
file: .forgejo/ci/Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: forge.lvl0.xyz/lvl0/rater-ci:latest
|
||||
|
|
@ -28,6 +28,19 @@ jobs:
|
|||
steps:
|
||||
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||
|
||||
# Debugging cache miss issue (#16) — check whether ACTIONS_CACHE_URL is injected and reachable
|
||||
- name: Debug cache env
|
||||
run: |
|
||||
echo "ACTIONS_CACHE_URL=${ACTIONS_CACHE_URL}"
|
||||
env | grep -i cache || true
|
||||
curl -v --max-time 5 "${ACTIONS_CACHE_URL}" || echo "CURL FAILED: $?"
|
||||
|
||||
- name: Cache PHP installation
|
||||
uses: https://data.forgejo.org/actions/cache@v4
|
||||
with:
|
||||
path: /usr/local/php
|
||||
key: php-8.4-pdo_pgsql-mbstring-xml-dom-intl-pcov
|
||||
|
||||
- name: Set up PHP
|
||||
uses: https://github.com/shivammathur/setup-php@v2
|
||||
with:
|
||||
|
|
@ -35,6 +48,25 @@ jobs:
|
|||
extensions: pdo_pgsql, mbstring, xml, dom, intl
|
||||
coverage: pcov
|
||||
|
||||
# Debugging cache miss issue (#16) — check if /usr/local/php exists after setup-php
|
||||
- name: Debug PHP install path
|
||||
run: |
|
||||
ls -la /usr/local/php 2>&1 || echo "/usr/local/php does not exist"
|
||||
which php
|
||||
php -v
|
||||
|
||||
# Debugging cache miss issue (#16) — ACTIONS_STEP_DEBUG enabled to inspect save/restore
|
||||
- name: Cache Composer dependencies
|
||||
uses: https://data.forgejo.org/actions/cache@v4
|
||||
with:
|
||||
path: ~/.composer/cache
|
||||
key: composer-${{ hashFiles('composer.lock') }}
|
||||
restore-keys: composer-
|
||||
|
||||
# Debugging cache miss issue (#16) — check if ~/.composer/cache exists before/after install
|
||||
- name: Debug composer cache path (before install)
|
||||
run: ls -la ~/.composer/cache 2>&1 || echo "~/.composer/cache does not exist yet"
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --no-interaction --prefer-dist
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue