Skip to content

Auto Update Assets #610

Auto Update Assets

Auto Update Assets #610

name: Auto Update Assets
on:
push:
branches:
- 'main'
schedule:
- cron: '0 0 * * *'
jobs:
auto_update_assets:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Update Client Extensions Samples
working-directory: ./internal/assets/tpl/client_extension/liferay-client-extensions-samples
run: |
mv git .git
git reset --hard HEAD
git clean -d -f .
git pull
mv .git git
- name: Commit Client Extensions Changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git restore ./internal/assets/tpl/client_extension/liferay-client-extensions-samples/git
git add ./internal/assets/tpl/client_extension/
git commit -am "chore: auto update client extensions samples" || echo "We're good for now. See you next time!"
git push