|
1 | | -name: GitHub Readme Stats Action |
2 | | -description: Generate GitHub Readme Stats cards in GitHub Actions. |
3 | | -author: readme-tools |
| 1 | +name: GitHub Readme Stats Fast Action |
| 2 | +description: Generate GitHub Readme Stats cards using fast renderer. |
| 3 | +author: Pranesh-2005 |
4 | 4 |
|
5 | 5 | inputs: |
6 | 6 | card: |
7 | | - description: Card type to generate (stats, top-langs, pin, wakatime, gist). |
| 7 | + description: Card type (stats, top-langs, pin, streak, wakatime, gist) |
8 | 8 | required: true |
| 9 | + |
9 | 10 | options: |
10 | | - description: Options for the card (query string or JSON). |
| 11 | + description: Query options (query string or JSON) |
11 | 12 | required: false |
12 | 13 | default: "" |
| 14 | + |
13 | 15 | path: |
14 | | - description: Output path for SVG file (relative path; include filename with .svg). |
| 16 | + description: Output SVG path |
15 | 17 | required: false |
16 | 18 | default: "" |
| 19 | + |
17 | 20 | token: |
18 | | - description: GitHub token (PAT or GITHUB_TOKEN). |
| 21 | + description: GitHub token (PAT or GITHUB_TOKEN) |
19 | 22 | required: false |
20 | 23 | default: "" |
21 | 24 |
|
22 | 25 | outputs: |
23 | 26 | path: |
24 | | - description: Path where the SVG file was written. |
| 27 | + description: Path of generated SVG |
25 | 28 |
|
26 | 29 | runs: |
27 | 30 | using: composite |
28 | 31 | steps: |
| 32 | + # ✅ Install Node |
29 | 33 | - name: Setup Node |
30 | 34 | uses: actions/setup-node@v4 |
31 | 35 | with: |
32 | 36 | node-version: 22 |
33 | | - cache: pnpm |
34 | 37 |
|
| 38 | + # ✅ Install pnpm |
35 | 39 | - name: Setup pnpm |
36 | 40 | uses: pnpm/action-setup@v4 |
37 | 41 | with: |
38 | 42 | version: 9 |
39 | 43 |
|
| 44 | + # ✅ Install deps via pnpm |
40 | 45 | - name: Install dependencies |
41 | 46 | run: pnpm install --prod --frozen-lockfile |
42 | 47 | shell: bash |
43 | 48 | working-directory: ${{ github.action_path }} |
44 | 49 |
|
| 50 | + # ✅ Run generator |
45 | 51 | - name: Generate card |
46 | 52 | run: node ${{ github.action_path }}/index.js |
47 | 53 | shell: bash |
48 | 54 | env: |
49 | 55 | INPUT_CARD: ${{ inputs.card }} |
50 | 56 | INPUT_OPTIONS: ${{ inputs.options }} |
51 | 57 | INPUT_PATH: ${{ inputs.path }} |
52 | | - # 👇 fallback handled in JS, not YAML |
53 | 58 | PAT_1: ${{ inputs.token }} |
54 | | - GITHUB_TOKEN: ${{ github.token }} |
55 | 59 |
|
56 | 60 | branding: |
57 | 61 | icon: bar-chart-2 |
|
0 commit comments