From 452ce247881632cb0e16c6fe321f59d2bdee7aa4 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 30 Aug 2023 23:54:10 +0100 Subject: [PATCH] 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. --- .github/workflows/update-check.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index bccfc81ff..16bea4524 100644 --- a/.github/workflows/update-check.yml +++ b/.github/workflows/update-check.yml @@ -33,11 +33,7 @@ jobs: - name: Insert steamuser if: matrix.shortname == 'jk2' - run: sed -i 's/steamuser=""/steamuser="${STEAMCMD_USER}"/g' 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 + run: echo "steamuser="${STEAMCMD_USER}\nsteampass='${STEAMCMD_PASS}'" lgsm/config-lgsm/${{ matrix.shortname }}server/common.cfg - name: Install server run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server auto-install