Auto Refresh #344
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Auto Refresh | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run | |
run: | | |
python run.py kcQuests -d 1 | |
- name: Copy file | |
run: | | |
sudo cp ca.crt /usr/local/share/ca-certificates/ | |
sudo update-ca-certificates | |
cp quests-scn.json dist/quests-scn.json | |
cp quests-scn-new.json dist/quests-scn-new.json | |
# Runs a set of commands using the runners shell | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: "GitHub Actions Refresh" | |
add: "." | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |