4
0

update-check.yml 1.8 KB

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