Skip to content

builder

builder #32

Workflow file for this run

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-1 liferay-sample-etc-frontend-components
mv liferay-sample-etc-frontend-2 liferay-sample-etc-frontend-shared-utils
mv liferay-sample-etc-frontend-3 liferay-sample-etc-frontend-shared-import-map
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-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