Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-services into main
  • Loading branch information
sudeeppr1998 committed Apr 26, 2024
2 parents a26be5e + f17e9ee commit 366eade
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

-
name: Load .env from GitHub Secret
run: echo "${{ secrets.MY_ENV_VARS }}" > .env

-
name: Build and push
uses: docker/build-push-action@v2
Expand All @@ -30,7 +30,7 @@ jobs:
push: true
tags: ${{ secrets.CONTAINER_REGISTRY }}:${{ secrets.IMAGE_TAG }}
env:
MY_ENV_VARS: ${{ secrets.MY_ENV_VARS }}
MY_ENV_VARS: ${{ secrets.MY_ENV_VARS }}
deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand All @@ -39,7 +39,7 @@ jobs:
-
name: Checkout
uses: actions/checkout@v2
-
-
name: Deploy Stack
uses: appleboy/ssh-action@master
with:
Expand All @@ -48,13 +48,12 @@ jobs:
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script: |
docker login
docker container stop ${{ secrets.CONTAINER_NAME }}
docker rm ${{ secrets.CONTAINER_NAME }}
docker rmi ${{ secrets.CONTAINER_REGISTRY }}:${{ secrets.IMAGE_TAG }}
docker pull ${{ secrets.CONTAINER_REGISTRY }}:${{ secrets.IMAGE_TAG }}
docker run -d --name ${{ secrets.CONTAINER_NAME }} --network ${{ secrets.NETWORK }} -p ${{ secrets.CONTAINER_PORT }} -t ${{ secrets.CONTAINER_REGISTRY }}:${{ secrets.IMAGE_TAG }}

0 comments on commit 366eade

Please sign in to comment.