Browse Source

refactor: simplify steamuser and steampass insertion in update-check.yml

The code changes remove unnecessary sed commands and replace them with a single echo command to insert the values of STEAMCMD_USER and STEAMCMD_PASS into the common.cfg file. This simplifies the code and improves readability.
pull/4298/head
Daniel Gibbs 2 years ago
parent
commit
452ce24788
  1. 6
      .github/workflows/update-check.yml

6
.github/workflows/update-check.yml

@ -33,11 +33,7 @@ jobs:
- name: Insert steamuser - name: Insert steamuser
if: matrix.shortname == 'jk2' if: matrix.shortname == 'jk2'
run: sed -i 's/steamuser=""/steamuser="${STEAMCMD_USER}"/g' lgsm/config-lgsm/${{ matrix.shortname }}server/common.cfg run: echo "steamuser="${STEAMCMD_USER}\nsteampass='${STEAMCMD_PASS}'" lgsm/config-lgsm/${{ matrix.shortname }}server/common.cfg
- name: Insert steampass
if: matrix.shortname == 'jk2'
run: sed -i 's/steampass=""/steampass='${STEAMCMD_PASS}'/g' lgsm/config-lgsm/${{ matrix.shortname }}server/common.cfg
- name: Install server - name: Install server
run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server auto-install run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server auto-install

Loading…
Cancel
Save