Skip to content

Run scrapper script #28

Run scrapper script

Run scrapper script #28

Workflow file for this run

name: Run scrapper script
"on":
workflow_dispatch:
inputs:
session:
description: "Academic session"
default: "2023/2024"
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@v4
- 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/[email protected]
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