Skip to content

Commit

Permalink
Fix handling of TAG env
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaczero committed Jan 8, 2024
1 parent e68e428 commit 615d1ec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ jobs:
run: |
ssh remote <<\EOF
set -e
image_filename=$(basename "${{ env.IMAGE_PATH }}")
tag="${{ env.TAG }}"
image_filename="$(basename "${{ env.IMAGE_PATH }}")"
function cleanup {
echo "Cleaning up"
Expand All @@ -74,12 +75,11 @@ jobs:
docker load < "$image_filename"
echo "Fetching latest changes from the git repository"
cd "$TAG"
git fetch origin "$TAG"
git checkout "$TAG"
git reset --hard "origin/$TAG"
cd "$tag"
git fetch origin "$tag"
git checkout "$tag"
git reset --hard "origin/$tag"
echo "Restarting containers"
export TAG=$TAG
docker compose --env-file "envs/compose/$TAG.env" up -d
TAG="$tag" docker compose --env-file "envs/compose/$tag.env" up -d
EOF

0 comments on commit 615d1ec

Please sign in to comment.