From 28da084819be188fad4174e66d55499b41b95902 Mon Sep 17 00:00:00 2001 From: Kamil Monicz Date: Mon, 2 Dec 2024 21:41:31 +0000 Subject: [PATCH] Make deployment tag a choice and fix origin branch --- .github/workflows/deploy.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 7d4e529..4203fa7 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -11,8 +11,11 @@ on: tag: description: 'Deployment tag' required: true - type: string + type: type default: 'main' + options: + - main + - dev jobs: deploy: @@ -103,9 +106,9 @@ jobs: echo "Fetching latest changes from the git repository" cd "$tag" - git fetch origin "$tag" - git checkout "$tag" - git reset --hard "origin/$tag" + git fetch origin main + git checkout main + git reset --hard origin/main echo "Restarting containers" docker compose down --remove-orphans