Skip to content

Add required dependencies (#327) #81

Add required dependencies (#327)

Add required dependencies (#327) #81

Workflow file for this run

name: "monorepo"
on:
push:
branches:
- "main"
tags:
- v*
env:
extensions: "json"
cache-version: "1"
composer-version: "v2"
composer-install: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable"
jobs:
monorepo_matrix:
name: "Create list of packages for split"
runs-on: "${{ matrix.operating-system }}"
strategy:
fail-fast: false
matrix:
operating-system: [ "ubuntu-latest" ]
# This step is needed, so the output gets to the next defined job
outputs:
matrix: ${{ steps.set-matrix.outputs.content }}
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Read matrix configuration"
id: "set-matrix"
uses: "juliangruber/read-file-action@v1"
with:
path: "./.github/workflows/monorepo-matrix.json"
split_monorepo:
name: "Update package"
runs-on: "${{ matrix.operating-system }}"
needs: [ "monorepo_matrix" ]
strategy:
fail-fast: false
matrix:
operating-system: [ "ubuntu-latest" ]
package: ${{fromJson(needs.monorepo_matrix.outputs.matrix)}}
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Monorepo Split of ${{ matrix.package.name }}"
if: "!startsWith(github.ref, 'refs/tags/')"
uses: "danharrin/monorepo-split-github-action@v2.3.0"
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_ACCESS_TOKEN }}
with:
package_directory: "${{ matrix.package.local-path }}"
repository_organization: "${{ matrix.package.organization }}"
repository_name: "${{ matrix.package.name }}"
user_name: "GitHub Action"
user_email: "action@github.com"
branch: "main"
- name: "Monorepo Tagged Split of ${{ matrix.package.name }}"
if: "startsWith(github.ref, 'refs/tags/')"
uses: "danharrin/monorepo-split-github-action@v2.3.0"
env:
GITHUB_TOKEN: ${{ secrets.ORGANIZATION_ACCESS_TOKEN }}
with:
tag: ${GITHUB_REF#refs/tags/}
package_directory: "${{ matrix.package.local-path }}"
repository_organization: "${{ matrix.package.organization }}"
repository_name: "${{ matrix.package.name }}"
user_name: "GitHub Action"
user_email: "action@github.com"
branch: "main"