github-profile-trophy-reiyu.../action.yml
Erik Donath 2ba2fe648c
Add local SVG generator script and GitHub Action for trophy SVGs (#412)
* Wrote a simple render_svg.ts file that generates the svg given an github username, theme and out path.

* render_svg.ts generates output dir if not exsists.

* Added Section to README.md that explains how to use the render_svg.ts script.

* Added an github action that utilizes the render_svg.ts script.

* Added Usage of github action to README.md

* Added simple CI Check if action runs.

* Ran: deno fmt
2026-01-27 11:55:58 +09:00

27 lines
797 B
YAML

name: Generate GitHub Profile Trophy SVG
description: Run the local generator script to produce an SVG.
inputs:
username:
description: "GitHub username to generate the trophy for"
required: true
output_path:
description: "Output path to write the SVG"
required: true
default: "trophy.svg"
token:
description: "PAT or token to use for GitHub API"
required: true
runs:
using: "composite"
steps:
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Generate trophy
shell: bash
env:
GITHUB_TOKEN1: ${{ inputs.token }}
run: |
deno run --allow-net --allow-env --allow-read --allow-write $GITHUB_ACTION_PATH/render_svg.ts "${{ inputs.username }}" "${{ inputs.output_path }}"