Update cli schema #787
This file contains hidden or 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: Update cli schema | |
| on: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| update-file: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v2 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: "22.x" | |
| - run: corepack enable | |
| - run: npm install | |
| - name: Run your script to update the file | |
| run: npm run cli-schema | |
| - name: Set git globals | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "Tolgee Machine" | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git add . | |
| git update-index --refresh | |
| CHANGED=$(git diff-index --quiet HEAD --; echo $?) | |
| echo "changed=${CHANGED}" >> $GITHUB_OUTPUT | |
| - name: Commit and push changes | |
| if: steps.changes.outputs.changed == '1' | |
| run: | | |
| git add . | |
| git commit -m "chore: Update CLI schema" | |
| git push origin main |