builder #84
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
name: builder | |
on: | |
push: | |
schedule: | |
- cron: '0 0 * * 1,4' | |
jobs: | |
builder: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Clone | |
run: | | |
git clone --depth 1 --filter=blob:none --no-checkout https://github.com/liferay/liferay-portal | |
- name: Sparse Checkout | |
working-directory: ./liferay-portal | |
run: | | |
git sparse-checkout init --no-cone | |
git sparse-checkout set workspaces/liferay-sample-workspace | |
git checkout master | |
- name: Rename samples | |
working-directory: ./liferay-portal/workspaces/liferay-sample-workspace/client-extensions | |
run: | | |
mv liferay-sample-custom-element-1 liferay-sample-custom-element-vanilla-js | |
mv liferay-sample-custom-element-2 liferay-sample-custom-element-react-scripts | |
mv liferay-sample-custom-element-3 liferay-sample-custom-element-angular | |
mv liferay-sample-custom-element-4 liferay-sample-custom-element-react-dom | |
mv liferay-sample-custom-element-5 liferay-sample-custom-element-react-clayui | |
mv liferay-sample-etc-frontend liferay-sample-etc-frontend-shared-import-map | |
mv liferay-sample-global-js-1 liferay-sample-global-js | |
mv liferay-sample-global-js-2 liferay-sample-global-js-with-attributes | |
mv liferay-sample-iframe-1 liferay-sample-iframe-counter | |
mv liferay-sample-iframe-2 liferay-sample-iframe-wikipedia | |
mv liferay-sample-theme-css-1 liferay-sample-theme-css-styled | |
mv liferay-sample-theme-css-2 liferay-sample-theme-css-unstyled | |
mv liferay-sample-theme-css-3 liferay-sample-theme-css-token-definition | |
mv liferay-sample-theme-spritemap-1 liferay-sample-theme-spritemap-single-svg | |
mv liferay-sample-theme-spritemap-2 liferay-sample-theme-spritemap-multiple-svg | |
- name: Rearrange | |
run: | | |
rm -r liferay-sample-* || echo "nothing to remove" | |
mv liferay-portal/workspaces/liferay-sample-workspace/client-extensions/* . | |
mv liferay-portal/workspaces/liferay-sample-workspace/README.markdown HOW-TO.md | |
rm -r liferay-portal | |
rm *.txt | |
- name: Commit files | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -am "chore: auto update samples" || echo "We're good for now. See you next time!" | |
git push |