Updater #1505
  
    
      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: Updater | |
| on: | |
| schedule: | |
| - cron: '12 1 * * 6' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'xvmconfigs/xvm-default-config' | |
| token: ${{ secrets.PAT }} | |
| - name: Update | |
| run: | | |
| rm -rf config | |
| mkdir -p config | |
| curl -L https://gitlab.com/xvm/xvm/-/archive/master/xvm-master.zip?path=release/configs/default -o tmp.zip | |
| unzip tmp.zip | |
| rm tmp.zip | |
| mv -v xvm-master-release-configs-default/release/configs/default/* config/ | |
| rm -r xvm-master-release-configs-default | |
| ls -lha | |
| ls -lha config | |
| - name: Commit files | |
| run: | | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "Update Bot" | |
| if [[ "$(git status --porcelain)" != "" ]]; then | |
| git add -A | |
| git commit -m "Update $(date -u +%Y-%m-%d)" | |
| git push origin | |
| else | |
| echo "No files to commit" | |
| fi |