Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
davema-clan committed Apr 24, 2024
1 parent 6afd159 commit d40b647
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/hello.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,16 @@ jobs:
steps:
- name: Get Short SHA
run: echo "${GITHUB_SHA:0:7}" > short_sha.txt

- name: Deploy Test
uses: easingthemes/ssh-deploy@main
if: ${{ github.ref_type == 'branch' }}
env:
REMOTE_HOST: ${{ secrets.REMOTE_HOST_TEST }}
REMOTE_USER: ubuntu
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY_TEST }}
SHORT_SHA: $(cat short_sha.txt)
SHORT_SHA: $(echo $GITHUB_SHA | cut -c1-7)
SCRIPT_RUN: |
docker ps |grep ${{ env.IMAGE_NAME }} && docker stop ${{ env.IMAGE_NAME }} && docker rm ${{ env.IMAGE_NAME }}
docker login ghcr.io -u $GITHUB_ACTOR -p "${{ secrets.SECRETS_GITHUB_TOKEN }}"
docker run -d --name ${{ env.IMAGE_NAME }} ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ SHORT_SHA }}
docker run -d --name ${{ env.IMAGE_NAME }} ghcr.io/${{ github.repository }}/${{ env.IMAGE_NAME }}:${{ env.SHORT_SHA }}

0 comments on commit d40b647

Please sign in to comment.