ci: integrate github actions
This commit is contained in:
parent
439f9a8a47
commit
e360ae8034
43
.github/workflows/generate-and-upload.yml
vendored
Normal file
43
.github/workflows/generate-and-upload.yml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
name: Generate and upload report to KTU Moodle
|
||||
|
||||
env:
|
||||
CONFIG_FILENAME: report.toml
|
||||
ASSIGNMENT_ID: 1657
|
||||
MOODLE_FILENAME: IF-1-1_Rokas_Puzonas.pdf
|
||||
DOTNET_VERSION: 3.0.103
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- 'report.toml'
|
||||
- 'Recursion/LD_24/**'
|
||||
|
||||
jobs:
|
||||
generate-and-upload:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Generate report
|
||||
uses: RokasPuzonas/ktu-oop-report-generator@v2.0.0
|
||||
with:
|
||||
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||
config-filename: ${{ env.CONFIG_FILENAME }}
|
||||
output-filename: report.pdf
|
||||
|
||||
- name: Archive report
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: report
|
||||
path: report.pdf
|
||||
|
||||
- name: Upload report to moodle
|
||||
uses: RokasPuzonas/ktu-moodle-assignment-upload@v1.0.3
|
||||
with:
|
||||
assignment-id: ${{ env.ASSIGNMENT_ID }}
|
||||
target-filename: report.pdf
|
||||
upload-filename: ${{ env.MOODLE_FILENAME }}
|
||||
ktu-username: ${{ secrets.KTU_USERNAME }}
|
||||
ktu-password: ${{ secrets.KTU_PASSWORD }}
|
Loading…
Reference in New Issue
Block a user