Files
HugoBlox-kit/.github/workflows/split-packages.yaml
T
George Cushen 61a67d7c5a ci(split-packages): enable manual + chained runs; gate on success
- add workflow_dispatch to run splitter from the UI
- add workflow_run to follow “Release HugoBlox Modules” completion
- guard job to run only when upstream conclusion == success
- add comment: upstream workflow `name:` must match exactly
- retain push trigger on main
2025-09-07 01:13:21 +01:00

59 lines
1.9 KiB
YAML

name: 'Package Splitter'
on:
push:
branches:
- main
workflow_dispatch:
# IMPORTANT: workflows below must match the upstream workflow's `name:` exactly
workflow_run:
workflows:
- Release HugoBlox Modules
types:
- completed
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
jobs:
packages_split:
# Run normally for push/workflow_dispatch; for workflow_run only run on success
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# define package to repository map
package:
- local_path: 'starters/academic-cv'
split_repository: 'theme-academic-cv'
- local_path: 'starters/resume'
split_repository: 'theme-resume'
- local_path: 'starters/blog'
split_repository: 'theme-blog'
- local_path: 'starters/documentation'
split_repository: 'theme-documentation'
- local_path: 'starters/link-in-bio'
split_repository: 'theme-link-in-bio'
- local_path: 'starters/landing-page'
split_repository: 'theme-landing-page'
steps:
- uses: actions/checkout@v5
# step if no tag is pushed
- if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: 'symplify/monorepo-split-github-action@v2.3.0'
with:
# ↓ split "packages/<package-name><package-name>" directory
package_directory: '${{ matrix.package.local_path }}'
# ↓ into https://github.com/HugoBlox/<package-name> repository
repository_organization: 'HugoBlox'
repository_name: '${{ matrix.package.split_repository }}'
# ↓ the user signed under the split commit
user_name: 'Splitter Bot'
user_email: 'no.reply@hugoblox.com'