Skip to content

Update README: expand tool description, add usage details, and highli… #4

Update README: expand tool description, add usage details, and highli…

Update README: expand tool description, add usage details, and highli… #4

Workflow file for this run

name: Release
# Releases run on version tags: SemVer only, no "v" prefix (e.g. 1.0.0, 2.1.3)
on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
permissions:
contents: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
guard:
name: Verify tag is on main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check tag points to main
run: |
git branch -a --contains "${{ github.sha }}" | grep -qE '(^|\s)(main|remotes/origin/main)$' \
|| { echo "::error::Tag must be on main branch"; exit 1; }
validate:
name: Validate
needs: guard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: |
~/.composer/cache/files
~/.cache/composer/files
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress --ignore-platform-req=ext-xdebug
- name: Run CI checks
run: composer ci
release:
name: Release
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
docker:
name: Build and push Docker image
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: .docker/Dockerfile
target: production
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}