Merge pull request #1434 from hydephp/update-realtime-compiler-dashbo… #1616
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Split the monorepo into readonly repositories | |
name: 🪓 Split monorepo | |
on: | |
push: | |
branches: [ "master" ] | |
# Cancels all previous workflow runs for the same branch that have not yet completed. | |
concurrency: | |
# The concurrency group contains the workflow name and the branch name. | |
group: ${{ github.workflow }}-${{ github.ref_type }}-${{ github.ref }}-${{ github.sha }} | |
cancel-in-progress: true | |
jobs: | |
hyde: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
environment: | |
name: hydephp/hyde | |
url: https://github.com/hydephp/hyde/tree/master | |
steps: | |
- name: Checkout hydephp/develop | |
uses: actions/checkout@v3 | |
with: | |
path: develop | |
persist-credentials: false | |
- name: Checkout hydephp/hyde | |
uses: actions/checkout@v3 | |
with: | |
repository: hydephp/hyde | |
path: hyde | |
ref: develop | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Download base files | |
run: wget https://github.com/hydephp/develop/zipball/${{ github.sha }} -O hyde.zip | |
- name: Unzip archive | |
run: unzip hyde.zip | |
- name: Empty the hyde directory | |
run: rm -rf hyde/* | |
- name: Copy over base files | |
run: cp -rf hydephp-develop-*/* hyde -v | |
- name: Copy over persisted files | |
run: cp -rf develop/packages/hyde/. hyde -v | |
- name: Remove monorepo support files | |
run: | | |
rm -rf hyde/monorepo -v | |
rm hyde/CHANGELOG.md -v | |
rm hyde/phpunit.dusk.xml -v | |
rm hyde/phpunit.xml.dist -v | |
rm hyde/psalm.xml -v | |
rm hyde/rector.php -v | |
rm hyde/ide.json -v | |
rm hyde/_ide_helper.php -v | |
- name: Commit and push changes | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
cd hyde | |
if ! [[ `git status --porcelain` ]]; then | |
echo "No changes to this package. Exiting gracefully."; | |
exit 0; | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hyde.git | |
git add . | |
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}" | |
git push upstream develop | |
echo "No changes to this package. Exiting gracefully." | |
framework: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
environment: | |
name: hydephp/framework | |
url: https://github.com/hydephp/framework/tree/master | |
steps: | |
- name: Checkout hydephp/develop | |
uses: actions/checkout@v3 | |
with: | |
path: develop | |
persist-credentials: false | |
- name: Checkout hydephp/framework | |
uses: actions/checkout@v3 | |
with: | |
repository: hydephp/framework | |
path: framework | |
ref: develop | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Empty the destination directory | |
run: rm -rf framework/* | |
- name: Copy over files | |
run: cp -rf develop/packages/framework/. framework -v | |
- name: Commit and push changes | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
cd framework | |
if ! [[ `git status --porcelain` ]]; then | |
echo "No changes to this package. Exiting gracefully."; | |
exit 0; | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/framework.git | |
git add . | |
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}" | |
git push upstream develop | |
echo "No changes to this package. Exiting gracefully." | |
realtime-compiler: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
environment: | |
name: hydephp/realtime-compiler | |
url: https://github.com/realtime-compiler/hyde/tree/master | |
steps: | |
- name: Checkout hydephp/develop | |
uses: actions/checkout@v3 | |
with: | |
path: develop | |
persist-credentials: false | |
- name: Checkout hydephp/realtime-compiler | |
uses: actions/checkout@v3 | |
with: | |
repository: hydephp/realtime-compiler | |
path: realtime-compiler | |
ref: master | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Empty the destination directory | |
run: rm -rf realtime-compiler/* | |
- name: Copy over files | |
run: cp -rf develop/packages/realtime-compiler/. realtime-compiler -v | |
- name: Commit and push changes | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
cd realtime-compiler | |
if ! [[ `git status --porcelain` ]]; then | |
echo "No changes to this package. Exiting gracefully."; | |
exit 0; | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/realtime-compiler.git | |
git add . | |
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}" | |
git push upstream master | |
hydefront: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
environment: | |
name: hydephp/hydefront | |
url: https://github.com/hydephp/hydefront/tree/master | |
steps: | |
- name: Checkout hydephp/develop | |
uses: actions/checkout@v3 | |
with: | |
path: develop | |
persist-credentials: false | |
- name: Checkout hydephp/hydefront | |
uses: actions/checkout@v3 | |
with: | |
repository: hydephp/hydefront | |
path: hydefront | |
ref: master | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Empty the destination directory | |
run: rm -rf hydefront/* | |
- name: Copy over files | |
run: cp -rf develop/packages/hydefront/. hydefront -v | |
- name: Commit and push changes | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
cd hydefront | |
if ! [[ `git status --porcelain` ]]; then | |
echo "No changes to this package. Exiting gracefully."; | |
exit 0; | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydefront.git | |
git add . | |
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}" | |
git push upstream master | |
docs: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
environment: | |
name: hydephp/docs | |
url: https://github.com/hydephp/hydephp.com/tree/upcoming | |
steps: | |
- name: Checkout hydephp/develop | |
uses: actions/checkout@v3 | |
with: | |
path: develop | |
persist-credentials: false | |
- name: Checkout hydephp/hydephp.com | |
uses: actions/checkout@v3 | |
with: | |
repository: hydephp/hydephp.com | |
path: website | |
ref: upcoming | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Empty the destination directory | |
run: rm -rf website/_docs/* | |
- name: Copy over files | |
run: cp -rf develop/docs/. website/_docs/ -v | |
- name: Remove internal docs | |
run: | | |
rm website/_docs/README.md | |
- name: Commit and push changes | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
cd website | |
if ! [[ `git status --porcelain` ]]; then | |
echo "No changes to this package. Exiting gracefully."; | |
exit 0; | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/hydephp.com.git | |
git add . | |
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}" | |
git push upstream upcoming | |
echo "No changes to this package. Exiting gracefully." | |
testing: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
environment: | |
name: hydephp/testing | |
url: https://github.com/hydephp/testing/tree/master | |
steps: | |
- name: Checkout hydephp/develop | |
uses: actions/checkout@v3 | |
with: | |
path: develop | |
persist-credentials: false | |
- name: Checkout hydephp/testing | |
uses: actions/checkout@v3 | |
with: | |
repository: hydephp/testing | |
path: testing | |
ref: master | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Empty the destination directory | |
run: rm -rf testing/* | |
- name: Copy over files | |
run: cp -rf develop/packages/testing/. testing -v | |
- name: Commit and push changes | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
cd testing | |
if ! [[ `git status --porcelain` ]]; then | |
echo "No changes to this package. Exiting gracefully."; | |
exit 0; | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/testing.git | |
git add . | |
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}" | |
git push upstream master | |
ui-kit: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
environment: | |
name: hydephp/ui-kit | |
url: https://github.com/hydephp/ui-kit/tree/master | |
steps: | |
- name: Checkout hydephp/develop | |
uses: actions/checkout@v3 | |
with: | |
path: develop | |
persist-credentials: false | |
- name: Checkout hydephp/ui-kit | |
uses: actions/checkout@v3 | |
with: | |
repository: hydephp/ui-kit | |
path: ui-kit | |
ref: master | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Empty the destination directory | |
run: rm -rf ui-kit/* | |
- name: Copy over files | |
run: cp -rf develop/packages/ui-kit/. ui-kit -v | |
- name: Commit and push changes | |
env: | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
cd ui-kit | |
if ! [[ `git status --porcelain` ]]; then | |
echo "No changes to this package. Exiting gracefully."; | |
exit 0; | |
fi | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote add upstream https://oauth2:${{ secrets.SPLIT_MONOREPO_TOKEN }}@github.com/hydephp/ui-kit.git | |
git add . | |
git commit -m "$COMMIT_MESSAGE https://github.com/hydephp/develop/commit/${{ github.sha }}" |