Skip to content

Trigger scraping on a CRON Schedule #4370

Trigger scraping on a CRON Schedule

Trigger scraping on a CRON Schedule #4370

Workflow file for this run

name: Trigger scraping on a CRON Schedule
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:
jobs:
execute:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create env file
run: |
echo "${{ secrets.ENV_FILE }}" > .env
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Pull docker images
run: |
docker pull ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}
- name: Execute job
run: |
docker run --rm --env-file .env --tty ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_REPO }}