Skip to content

feature: push notification fcm (#100) #96

feature: push notification fcm (#100)

feature: push notification fcm (#100) #96

Workflow file for this run

name: Docker Image CI
on:
push:
branches: "develop"
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/test_disappear:latest
-
name: connect ssh
uses: appleboy/ssh-action@v0.1.9
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
sudo docker stop ${{ secrets.CNAME }}
sudo docker rm ${{ secrets.CNAME }}
sudo docker rmi ${{ secrets.DOCKERHUB_USERNAME }}/test_disappear
sudo docker run --name ${{ secrets.CNAME }} -p 80:8000 -d -e DBHOST=${{secrets.DBHOST}} -e DBPORT=${{secrets.DBPORT}} -e DBUSER=${{secrets.DBUSER}} -e DBNAME=${{secrets.DBNAME}} -e DBPASS=${{secrets.DBPASS}} -e SECRET=${{secrets.SECRET}} -e SERVER=${{secrets.SERVER}} -e SMTP_PASS=${{secrets.SMTP_PASS}} -e SMTP_USER=${{secrets.SMTP_USER}} -e SMTP_PORT=${{secrets.SMTP_PORT}} -e CCNAME=${{secrets.CCNAME}} -e CCAPIKEY=${{secrets.CCAPIKEY}} -e CCAPISECRET=${{secrets.CCAPISECRET}} -e CCFOLDER=${{secrets.CCFOLDER}} -e OPENAIAPIKEY=${{secrets.OPENAIAPIKEY}} -e MONGOURL=${{secrets.MONGOURL}} -e CLIENTKEY=${{secrets.CLIENTKEY}} -e SERVERKEY=${{secrets.SERVERKEY}} -e REDIS_ADDR=${{secrets.REDIS_ADDR}} -e REDIS_PASS=${{secrets.REDIS_PASS}} -e RESIKEY=${{secrets.RESIKEY}} ${{ secrets.DOCKERHUB_USERNAME }}/test_disappear