ci-templates/.forgejo/workflows/typo3-build.yaml
Dominik Polakovics ac631ce832
All checks were successful
Self Test / test (push) Successful in 13s
feat: try different pipelines
2026-02-02 20:28:12 +01:00

66 lines
1.8 KiB
YAML

# Cloonar TYPO3 Staged Deployment Workflow
#
# Staged deployment: build → deploy to stage → run E2E tests → switch release
#
# Usage in project's .forgejo/workflows/deploy.yaml:
# name: Deploy
# on:
# push:
# branches: [main]
# jobs:
# deploy:
# uses: infrastructure/ci-templates/.forgejo/workflows/typo3-staged-deploy.yaml@main
# with:
# stage_url: https://myproject.cloonar.dev
# php_version: '8.3'
# secrets:
# stage_key: ${{ secrets.STAGE_KEY }}
# prod_key: ${{ secrets.PROD_KEY }}
name: TYPO3 Staged Deploy
on:
workflow_call:
inputs:
php_version:
description: 'PHP version'
required: false
type: string
default: '8.3'
env:
COMPOSER_ALLOW_SUPERUSER: 1
jobs:
# ===========================================================================
# Build
# ===========================================================================
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php_version }}
tools: composer
- name: Install PHP dependencies
run: composer install --prefer-dist --no-progress --no-dev --ignore-platform-reqs
- name: Create artifact
run: |
tar -czf build.tar.gz \
bin public packages config vendor build composer.json composer.lock \
$([ -d "node_modules" ] && echo "node_modules") \
$([ -d "dist" ] && echo "dist") \
2>/dev/null || true
- uses: actions/upload-artifact@v4
with:
name: build-${{ github.sha }}
path: build.tar.gz
retention-days: 1