Skip to content

cronjob

cronjob #105119

Workflow file for this run

name: cronjob
on:
schedule:
- cron: '*/10 * * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: 'cache'
path: 'cache'
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Generate time env
run: echo "NOW=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/registry
~/.cache/pip
key: ${{ runner.os }}-${{ github.sha }}-${{ env.NOW }}
restore-keys: |
${{ runner.os }}-
- name: Install dependencies
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Sync repo
env:
DN42GITTOKEN: ${{ secrets.DN42GITTOKEN }}
run: ./run_init.sh $DN42GITTOKEN
- name: Run jobs
env:
BOTTOKEN: ${{ secrets.REG42BOTTOKEN }}
TARGET_CHAT: ${{ secrets.REG42BOTCHANNELID }}
run: ./run.sh
- name: Deploy Cache
uses: JamesIves/[email protected]
with:
branch: cache
folder: cache