Auto Client App create Vite upgrade #9
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: auto clientapp create react app upgrade | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 4 15 * *' | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: master | |
- name: 'Update clientapp' | |
id: clientapp_create_react_app_update | |
working-directory: ./starsky-tools/build-tools | |
run: npm run clientapp-create-react-app-update | |
- shell: bash | |
working-directory: ./starsky | |
id: files_changed | |
run: | | |
git status | |
git status --porcelain | |
if [[ `git status --porcelain` ]]; then | |
echo "There are files not committed yet" | |
echo "CHANGED=true" >> $GITHUB_OUTPUT | |
else | |
echo "not changed" | |
echo "CHANGED=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Create Pull Request ${{ steps.files_changed.outputs.CHANGED }} | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.WORKFLOW_GITHUB }} | |
commit-message: 'Update ClientApp' | |
committer: GitHub <[email protected]> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
add-paths: | | |
* | |
branch: feature/auto_clientapp_create_react_app_update | |
delete-branch: true | |
title: 'Client App - Create React App - Upgrade dependencies' | |
body: | | |
## Upgrade Client App to the lastest version | |
- todo: test! | |
labels: | | |
dependencies | |
draft: false | |
- name: Merge current branch into -> auto_clientapp_create_react_app_update | |
uses: everlytic/[email protected] | |
if: github.event_name == 'workflow_dispatch' && steps.files_changed.outputs.CHANGED == 'true' | |
with: | |
github_token: ${{ secrets.WORKFLOW_GITHUB }} | |
source_ref: 'master' | |
target_branch: feature/auto_clientapp_create_react_app_update | |
commit_message_template: '[Automated] Merged {source_ref} into target {target_branch}' |