feat: wss dedicated #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CICD Pipeline | |
on: | |
push: | |
branches: [ "main" ] | |
# paths: | |
# - 'WebsocketServer/**' | |
jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Loging in to DockerHub | |
# uses: docker/login-action@v1 | |
# with: | |
# username: ${{ secrets.DOCKER_USERNAME }} | |
# password: ${{ secrets.DOCKER_PASSWORD }} | |
# - name: Build and push Docker image | |
# uses: docker/build-push-action@v2 | |
# with: | |
# context: ./WebsocketServer | |
# file: ./WebsocketServer/Dockerfile | |
# push: true | |
# tags: axnjr/ignition_wsss:latest | |
deploy: | |
# needs: build | |
runs-on: self-hosted | |
steps: | |
- name: Pulling image from docker hub | |
run: docker pull axnjr/ignition_wsss:latest | |
- name: Deleting older container | |
run: docker rm -f ignition_wss-shared | |
- name: Run docker container | |
run: docker run -d -e DB_URL=${{ secrets.DB_URL }} -e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} -e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} -e REGION=${{ secrets.REGION }} -e PORT=${{ secrets.PORT }} --network host --name ignition_wss-shared axnjr/ignition_wsss:latest | |
- name: Check container logs | |
run: docker logs ignition_wss-shared |