From 630c836a309a7f97f78d78d32832fb0ebfd07ea8 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Fri, 5 Jul 2024 12:56:50 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20checkout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/support-service-update.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/support-service-update.yml b/.github/workflows/support-service-update.yml index 1aeab8f7..92d61db5 100644 --- a/.github/workflows/support-service-update.yml +++ b/.github/workflows/support-service-update.yml @@ -28,6 +28,7 @@ jobs: port: ${{ secrets.SUPPORT_SERVICE_PORT }} envs: SUPPORT_SERVICE_PATHNAME,SUPPORT_SERVICE_SYSTEMD_NAME script: | + checkout_branch="origin/chore/support-cicd-service-update" if ! cd "$SUPPORT_SERVICE_PATHNAME"; then echo "👹 Oops! Failed to change work directory" exit 1 @@ -37,7 +38,7 @@ jobs: # TODO: Should use default branch not hard-typed # due to testing, develop is hard typed here - if ! git fetch origin && git reset --hard origin/chore/support-cicd-service-update; then + if ! git fetch origin && git reset --hard "$checkout_branch" && git checkout "$checkout_branch"; then echo "👹 Oops! Failed to change work directory" exit 1 fi