-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (57 loc) · 2.68 KB
/
builder.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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-page
mv liferay-sample-global-js-2 liferay-sample-global-js-page-with-attributes
mv liferay-sample-global-js-3 liferay-sample-global-js-instance
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