6 Commits
Author SHA1 Message Date
haylan d15e25abf3 Merge branch 'main' into patch-2-gitea-registry
Tests / test (pull_request) Has been cancelled
Tests / docker-build (pull_request) Has been cancelled
2026-07-17 10:09:04 +00:00
haylan 53186e9a35 feat(ci): add GitHub Actions workflow for testing and Docker builds
Tests / test (pull_request) Has been cancelled
Tests / docker-build (pull_request) Has been cancelled
2026-07-17 12:07:31 +02:00
haylan 7688fd77c9 Merge pull request 'chore(docker): remove redundant composer dump-env command in build stage' (#16) from patch-2-gitea-registry into main
Reviewed-on: #16
2026-07-13 10:23:14 +00:00
haylan 6e79337a60 chore(docker): remove redundant composer dump-env command in build stage 2026-07-13 12:19:06 +02:00
haylan 68424aa28b Merge pull request 'chore(ci/cd): replaced registry url.' (#15) from patch-2-gitea-registry into main
Reviewed-on: #15
2026-07-13 10:11:00 +00:00
haylan fdc7fa700d chore(ci/cd): replaced registry url. 2026-07-13 12:10:38 +02:00
3 changed files with 66 additions and 8 deletions
+3 -6
View File
@@ -19,6 +19,9 @@ on:
required: true
type: string
env:
REGISTRY: git.arthurerlich.de
jobs:
build-push:
runs-on: ubuntu-latest
@@ -40,12 +43,6 @@ jobs:
fi
git checkout "refs/tags/${{ inputs.tag }}"
# Strip the protocol from the server URL to get the registry hostname.
# e.g. https://gitea.example.com → gitea.example.com
- name: Derive registry hostname
run: |
echo "REGISTRY=$(echo '${{ gitea.server_url }}' | sed 's|https://||;s|http://||')" >> $GITHUB_ENV
# Generates OCI-compliant tags and labels from the provided release tag.
# 1.2.3 → image tags: 1.2.3 / 1.2 / 1
- name: Extract Docker metadata
+62
View File
@@ -0,0 +1,62 @@
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.4"
extensions: intl, zip, opcache
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-${{ hashFiles('composer.lock') }}
restore-keys: composer-
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHPUnit
run: vendor/bin/phpunit --testdox
- name: Run PHPStan
run: composer phpstan
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build prod image (final target)
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
target: final
push: false
- name: Build dev image (dev target)
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.dev
target: dev
push: false
+1 -2
View File
@@ -30,8 +30,7 @@ FROM deps AS build
COPY . .
RUN composer dump-autoload --classmap-authoritative --no-dev --no-interaction && \
mkdir -p var/cache var/log && \
APP_ENV=prod APP_SECRET=placeholder php bin/console cache:warmup --no-debug && \
composer dump-env prod
APP_ENV=prod APP_SECRET=placeholder php bin/console cache:warmup --no-debug
# ── final (prod) stage — no composer binary ────────────────────────────────────
FROM base AS final