-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (32 loc) · 931 Bytes
/
worker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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