1
0

ci: create generate-upload.yml

This commit is contained in:
Rokas Puzonas 2021-12-17 21:42:42 +02:00
parent 1cc92e8e0f
commit fc59e57ee7

62
.github/workflows/generate-upload.yml vendored Normal file
View File

@ -0,0 +1,62 @@
name: Generate and upload report to KTU Moodle
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
everything:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generator report
uses: RokasPuzonas/ktu-oop-report-generator@v1.0.0
with:
dotnet-version: 3.0.103
config-filename: report.toml
output-filename: report.pdf
# - name: Setup .NET
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: 3.0.103
# - name: Setup Python
# uses: actions/setup-python@v2.3.1
# with:
# python-version: 3.x
# - name: Clone report generator
# run: git clone https://github.com/RokasPuzonas/ktu-oop-report-generator
# - name: Setup report generator
# run: |
# cd ktu-oop-report-generator
# python -m venv venv
# source venv/bin/activate
# pip install -r requirements.txt
# - name: Run report generator
# run: |
# cd ktu-oop-report-generator
# source venv/bin/activate
# ./main.py ../report.toml
# - name: Clone moodle uploader
# run: git clone https://github.com/RokasPuzonas/ktu-moodle-assignment-upload
# - name: Setup Geckodriver
# uses: browser-actions/setup-geckodriver@v0.0.0
# - name: Setup moodle uploader
# run: |
# cd ktu-moodle-assignment-upload
# python -m venv venv
# source venv/bin/activate
# pip install -r requirements.txt
# - name: Run moodle uploader
# run: |
# cd ktu-moodle-assignment-upload
# source venv/bin/activate
# ./main.py 1499 ../report.pdf IF-1-1_Rokas_Puzonas.pdf
# env:
# KTU_USERNAME: ${{ secrets.KTU_USERNAME }}
# KTU_PASSWORD: ${{ secrets.KTU_PASSWORD }}