Skip to content

Commit bd690c7

Browse files
committed
add github action yml
0 parents  commit bd690c7

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/leetcoder.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: leetcoder auto download
2+
on:
3+
schedule:
4+
- cron: "0 0 * * *"
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
jobs:
10+
leetcoder-download:
11+
runs-on: ubuntu-latest
12+
env:
13+
LEETCODE_COOKIE: ${{ secrets.LEETCODE_COOKIE }}
14+
DOWNLOAD_FOLDER: './'
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: 3.1.1
22+
23+
- name: Install leetcoder
24+
run: gem install leetcoder
25+
26+
- name: Download Submissions
27+
run: leetcoder -d all -f $DOWNLOAD_FOLDER
28+
29+
- name: Commit changes
30+
uses: stefanzweifel/git-auto-commit-action@v4
31+
with:
32+
commit_message: 'leetcoder: updated leetcode submissions'
33+
commit_user_email: leetcoder+github-actions[leetcoder]@users.noreply.github.com
34+
commit_author: Imam Hossain <imam.swe@gmail.com>

0 commit comments

Comments
 (0)