-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
43 lines (38 loc) · 1.06 KB
/
action.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
name: "LeetCode Synchronizer"
description: "Automatically collect and organize LeetCode submissions into a GitHub repository"
branding:
icon: git-commit
color: black
inputs:
GITHUB_TOKEN:
description: "GitHub Token"
required: true
LEETCODE_SESSION:
description: "LeetCode Session"
required: true
LEETCODE_CSRF_TOKEN:
description: "LeetCode CSRF Token"
required: true
runs:
using: "composite"
steps:
- name: Checkout GitHub Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Resolve Dependencies
run: |
python -m pip install --upgrade pip
pip install requests GitPython
shell: bash
- name: Run LeetCode Synchronizer
run: python ${{ github.action_path }}/main.py
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
LEETCODE_SESSION: ${{ inputs.LEETCODE_SESSION }}
LEETCODE_CSRF_TOKEN: ${{ inputs.LEETCODE_CSRF_TOKEN }}