Skip to content

Commit

Permalink
Add training workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianZaremba committed Aug 29, 2021
0 parents commit c41a7d3
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/trainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run training logic
on:
schedule:
- cron: '13 10 * * *'
push:
branches:
- main
permissions:
contents: write
jobs:
trainer:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with: { python-version: '3.9' }
- name: Install cbng-trainer
run: pip install git+https://github.com/cluebotng/trainer.git@main
- name: Download reviewed edits
run: cbng-trainer download-edits --output=edits.xml
- name: Build databases
run: |
mkdir -p new
cbng-trainer build-database --input=edits.xml --output new/
- name: Prepare files
id: prep
run: |
sudo chown -R runner:docker new
sudo chmod 644 new/*
cp edits.xml new/ || true
echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Crease a release
uses: ncipollo/release-action@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
artifacts: "new/*"
tag: "${{ steps.prep.outputs.date }}"

0 comments on commit c41a7d3

Please sign in to comment.