Skip to content

Commit

Permalink
More Frequent Lesson Updates
Browse files Browse the repository at this point in the history
- Updated actions/checkout to v4 on all workflows
- refresh_lessons now work every 5 minutes.
  • Loading branch information
AtaTrkgl committed Jan 21, 2025
1 parent 34c3a14 commit 67c38fd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/keep_alive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
name: Cronjob based github action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# commits to the repo if the last commit was 50 days ago to keep the repo alive.
- uses: gautamkrishnar/keepalive-workflow@v1
4 changes: 2 additions & 2 deletions .github/workflows/refresh_course_plans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
# Clones the repo
- name: Checkout Repo Content
uses: actions/checkout@v2
uses: actions/checkout@v4

# Clones the data repo
- name: Clone Data Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: itu-helper/data
token: ${{ secrets.API_TOKEN_GITHUB }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/refresh_courses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
# Clones the repo
- name: Checkout Repo Content
uses: actions/checkout@v2
uses: actions/checkout@v4

# Clones the data repo
- name: Clone Data Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: itu-helper/data
token: ${{ secrets.API_TOKEN_GITHUB }}
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/refresh_lessons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ name: Refresh Lessons

on:
schedule:
# At every 15th minute from 4 through 59 past every hour from 2 through 23.
- cron: "4/15 2/1 * * *"
# At every 5th minute from 4 through 59 past every hour from 2 through 23.
- cron: "4/5 2/1 * * *"

workflow_dispatch:

jobs:
refresh_lessons:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
# Clones the repo
- name: Checkout Repo Content
uses: actions/checkout@v2
uses: actions/checkout@v4

# Clones the data repo
- name: Clone Data Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: itu-helper/data
token: ${{ secrets.API_TOKEN_GITHUB }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/refresh_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
# Clones the repo
- name: Checkout Repo Content
uses: actions/checkout@v2
uses: actions/checkout@v4

# Clones the data repo
- name: Clone Data Repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: itu-helper/data
token: ${{ secrets.API_TOKEN_GITHUB }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ _Github Actions_ kullanarak **Veri Yenileme Aralıkları** kısmında belirtilen

## **Veri Yenileme Aralıkları**

- **(00:04 - 02:49) 15dk da bir**: _Lesson_'lar güncellenir.
- **(00:04 - 02:49) 5 dk'de bir**: _Lesson_'lar güncellenir.
- **(02:55)**: Bina ve program kodları güncellenir.
- **(03:00)**:
- **Pazartesileri**: _Course_'lar güncellenir.
- **Salıları**: Ders Planları güncellenir.
- **(05:04 - 23:49) 15dk da bir**: _Lesson_'lar güncellenir.
- **(05:04 - 23:49) 5 dk'de bir**: _Lesson_'lar güncellenir.

> [!NOTE]
> _Lesson_'ların daha sık güncellenmesinin nedeni kontenjan verilerinin güncel tutulmasının gerekmesidir. _Course_'ların ve Ders Planlarının güncellendiği sırada _Lesson_'ların güncellenememsi _Github Actions_'da kullandığımız _Git Auto Commit_'in repo'da değişiklik olması durumda commit atamamasındandır.
Expand Down

0 comments on commit 67c38fd

Please sign in to comment.