Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
73 lines (61 loc) · 1.83 KB
/
Copy pathaction.yml
File metadata and controls
73 lines (61 loc) · 1.83 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: GitHub Readme Activity Graph Action
description: Generate GitHub Readme Activity Graph in GitHub Actions.
author: maurodesouza
inputs:
username:
description: GitHub username to generate the activity graph for.
required: true
options:
description: Options for the card (query string or JSON).
required: false
default: ""
output_path:
description: Output path for SVG file (relative path; include filename with .svg).
required: false
default: ""
token:
description: GitHub token (PAT or GITHUB_TOKEN). Falls back to github.token if not provided.
required: false
default: ""
outputs:
path:
description: Path where the SVG file was written.
value: ${{ steps.generate.outputs.path }}
runs:
using: composite
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
version: 10.12.4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
- name: Configure pnpm store
shell: bash
run: pnpm config set store-dir ~/.pnpm-store
- name: Cache pnpm store
uses: actions/cache@v6
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
shell: bash
working-directory: ${{ github.action_path }}
- name: Generate card
id: generate
run: pnpm exec tsx src/index.js
shell: bash
working-directory: ${{ github.action_path }}
env:
INPUT_USERNAME: ${{ inputs.username }}
INPUT_OPTIONS: ${{ inputs.options }}
INPUT_OUTPUT_PATH: ${{ inputs.output_path }}
TOKEN: ${{ inputs.token || github.token }}
branding:
icon: bar-chart-2
color: blue