Skip to content

worker

worker #630

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: '13 */6 * * *'
name: worker
env:
LATEST_TAG: docker.io/flexicon/tft-suggester:latest
jobs:
collect_data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
id: docker_build
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
load: true
tags: ${{ env.LATEST_TAG }}
- name: Run worker
env:
DATA_FETCHED_WEBHOOK: ${{ secrets.DATA_FETCHED_WEBHOOK }}
DB_NAME: ${{ secrets.DB_NAME }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
run: |
docker run -e DATA_FETCHED_WEBHOOK -e DB_NAME -e MONGODB_URI \
-v /dev/shm:/dev/shm \
--rm ${{ env.LATEST_TAG }} python3 -m scraper