Skip to content

Commit

Permalink
ci: update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DamirLut committed Apr 12, 2024
1 parent 25188e8 commit c868962
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ jobs:
uses: actions/checkout@v2

- name: Build Docker image
run: docker build -t $IMAGE:latest .
run: docker build -t ${IMAGE}:latest .

- name: Save Docker image as tar file
run: docker save -o $IMAGE.tar $IMAGE:latest
run: docker save -o ${IMAGE}.tar ${IMAGE}:latest
- name: Transfer Docker image to remote server
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
scp -o StrictHostKeyChecking=no $IMAGE.tar ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:${{ secrets.REMOTE_PATH }}
scp -o StrictHostKeyChecking=no ${IMAGE}.tar ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }}:${{ secrets.REMOTE_PATH }}
- name: Load Docker image on remote server
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} << 'ENDSSH'
docker load -i ${{ secrets.REMOTE_PATH }}/$IMAGE.tar
docker load -i ${{ secrets.REMOTE_PATH }}/${IMAGE}.tar
ENDSSH
- name: Transfer Docker Compose file to remote server
run: |
Expand Down

0 comments on commit c868962

Please sign in to comment.