action-update-check.yml 1.9 KB

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