Skip to content

Commit

Permalink
Webrepl deployment update (#229)
Browse files Browse the repository at this point in the history
* Pass ENVs to release GA
* Update CI deployment script
  • Loading branch information
ksclarke authored Dec 18, 2024
1 parent b08bd96 commit 4e9477a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ jobs:
run: |
GITHUB_REF="${{ github.ref }}" &&
TAG_NAME="${GITHUB_REF#refs/tags/}" &&
echo "ARTIFACT_NAME=${TAG_NAME%%-*}" >> $GITHUB_ENV &&
echo "REPO_OWNER=${{ github.repository_owner }}" >> GITHUB_ENV &&
echo "ARTIFACT_NAME=jpv3-${TAG_NAME%%-*}" >> $GITHUB_ENV &&
echo "RELEASE_VERSION=${TAG_NAME#webrepl-}" >> $GITHUB_ENV
- name: SSH to server and deploy
Expand All @@ -100,7 +101,9 @@ jobs:
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
envs: ARTIFACT_NAME,RELEASE_VERSION
envs: ARTIFACT_NAME,RELEASE_VERSION,REPO_OWNER
script: |
docker-compose pull $ARTIFACT_NAME:$RELEASE_VERSION
docker-compose up -d $ARTIFACT_NAME
docker rm -f $(docker ps | grep ${ARTIFACT_NAME} | cut -d' ' -f1)
docker rmi $(docker ps | grep ${ARTIFACT_NAME} | tr -s ' ' | cut -d' ' -f2)
docker pull ${REPO_OWNER}/${ARTIFACT_NAME}:${RELEASE_VERSION}
docker run -d ${REPO_OWNER}/${ARTIFACT_NAME}:${RELEASE_VERSION}

0 comments on commit 4e9477a

Please sign in to comment.