-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.48 KB
/
run_scrapper.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Run scrapper script
"on":
workflow_dispatch:
inputs:
session:
description: "Academic session"
default: "2022/2023"
required: true
type: string
semester:
description: "Semester"
default: 1
required: true
type: choice
options:
- 1
- 2
- 3
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Dart SDK
id: setup-dart-sdk
uses: dart-lang/[email protected]
- name: Install dependencies
run: dart pub get
- name: Run scrapper
id: dart-scrapper
run: dart bin/albiruni_fetcher.dart --session ${{ inputs.session }} --sem ${{ inputs.semester }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "🗃️ update DB from ${{ github.run_id }}"
title: "🗃️ Update DB (session ${{ inputs.session }}, sem ${{ inputs.semester }})"
body: "![chart_iium_subjects](${{ steps.dart-scrapper.outputs.chart_link }})"
branch: update/db
base: master
- run: echo "Job completed successfully. Using **Dart ${{ steps.setup-dart-sdk.outputs.dart-version }}**" >> $GITHUB_STEP_SUMMARY
- run: echo "Scrap job for **session ${{ inputs.session }}** and **semester ${{ inputs.semester }}**" >> $GITHUB_STEP_SUMMARY