Skip to content

add extra logging

add extra logging #10

name: Development workflow
on:
push:
branches: [ develop ]
jobs:
setup:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Set Up ENV
run: |
echo "${{ secrets.API_TOKEN }}" >> ./api/.env
echo "${{ secrets.API_ENDPOINT }}" >> ./api/.env
echo "${{ secrets.SECRET_TOKEN}}" >> ./api/.env
build-image:
needs: setup
runs-on: self-hosted
steps:
- name: Build the Docker image
run: docker build . --file Dockerfile -t bot-detector/bd-ml:latest --build-arg api_port=6532 --build-arg root_path=/ml --target production
- name: Tag Image
run: docker tag bot-detector/bd-ml:latest hub.osrsbotdetector.com/bot-detector/bd-ml:latest
- name: Login to Docker Registry
run: echo "${{ secrets.DOCKER_REGISTRY_PASSWORD }}" | docker login https://hub.osrsbotdetector.com -u "${{ secrets.DOCKER_REGISTRY_USERNAME }}" --password-stdin
- name: Push Image to Registry
run: docker push hub.osrsbotdetector.com/bot-detector/bd-ml:latest
deploy:
needs: build-image
runs-on: self-hosted
steps:
- name: Apply Possible Deployment Changes
run: kubectl apply -f deployment/
- name: Restart Deployment for Possible Container Changes
run: kubectl rollout restart deploy bd-ml