update-check.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: Update Check
  2. # This action will check that LinuxGSM is picking up game server config and parameter variables.
  3. on:
  4. workflow_dispatch:
  5. push:
  6. concurrency:
  7. group: update-check-${{ github.ref_name }}
  8. cancel-in-progress: true
  9. jobs:
  10. update-check:
  11. continue-on-error: true
  12. runs-on: ubuntu-latest
  13. strategy:
  14. matrix:
  15. shortname: [css, fctr, jk2, mc, mcb, mta, pmc, ts3, ut99, vints]
  16. steps:
  17. - name: Download linuxgsm.sh
  18. run: wget https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh; chmod +x linuxgsm.sh
  19. - name: Install dependencies
  20. run: sudo dpkg --add-architecture i386; sudo apt-get update;
  21. - name: Grab server
  22. run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server
  23. - name: Enable developer mode
  24. run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer
  25. - name: Insert steamuser
  26. if: matrix.shortname == 'jk2'
  27. run: echo -e "steamuser=\"${{ secrets.STEAMCMD_USER }}\"\nsteampass='${{ secrets.STEAMCMD_PASS }}'" > lgsm/config-lgsm/${{ matrix.shortname }}server/common.cfg
  28. - name: Install server
  29. run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server auto-install
  30. - name: Check Update server
  31. run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server check-update
  32. - name: Update server
  33. run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server update
  34. - name: Force Update server
  35. if: matrix.shortname == 'css'
  36. run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server force-update