Skip to content

Commit

Permalink
make db
Browse files Browse the repository at this point in the history
  • Loading branch information
captn3m0 committed Mar 14, 2024
1 parent 0e6d14b commit d69fb7c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@ jobs:
with:
format: YYYY-ww
- name: Cache File
uses: actions/cache@v3
uses: actions/cache@v4
with:
# Use current week number as cache
path: .cache.pkl
key: "cache-${{ steps.current-time.outputs.formattedTime }}"
- name: Cache File
uses: actions/cache@v3
with:
path: /home/runner/.cache/event-fetcher-cache.sqlite
key: "cache-requests-${{ steps.current-time.outputs.formattedTime }}"
- uses: actions/checkout@v4
name: Clone self repository
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Setup
Expand All @@ -39,12 +44,22 @@ jobs:
git config --global extensions.partialClone true
pip install -r requirements.txt
- name: Fetch updates
run: rm out/* && make all
run: rm out/* && make all && make db
- uses: stefanzweifel/git-auto-commit-action@v5
name: Commit
with:
commit_message: Daily Updates
commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>'
add_options: "--ignore-removal --update"
file_pattern: "out/*"
status_options: '--untracked-files=no'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Put the events.db in the artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: events.db
path: events.db
if-no-files-found: error
retention-days: 90
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ _site
.jekyll-metadata
vendor
tmp.py
tmp
tmp
events.db
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ out/bic.json:
python src/ics-to-event.py out/bic.ics out/bic.json

all: out/allevents.txt out/highape.txt out/mapindia.json out/bic.ics out/insider.txt out/bengalurusustainabilityforum.json out/bhaagoindia.txt out/scigalleryblr.json out/mmb.txt out/venn.json out/zomato.json out/urbanaut.json out/champaca.json out/atta_galatta.json out/bic.json
@echo "Done"
@echo "Done"

db:
python src/event-fetcher.py

0 comments on commit d69fb7c

Please sign in to comment.