{"id":20579053,"url":"https://github.com/bfra-me/github-action","last_synced_at":"2026-02-09T11:00:41.685Z","repository":{"id":63349929,"uuid":"560309401","full_name":"bfra-me/github-action","owner":"bfra-me","description":"GitHub Action template repository for @bfra-me.","archived":false,"fork":false,"pushed_at":"2025-04-10T09:25:38.000Z","size":10252,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T10:47:20.472Z","etag":null,"topics":["actions","github-actions","nodejs","template","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bfra-me.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-01T07:37:38.000Z","updated_at":"2025-04-10T09:24:45.000Z","dependencies_parsed_at":"2023-09-25T09:06:10.257Z","dependency_job_id":"dd089ba5-e26f-409e-b916-b23d7c9a5b32","html_url":"https://github.com/bfra-me/github-action","commit_stats":{"total_commits":232,"total_committers":46,"mean_commits":5.043478260869565,"dds":0.6681034482758621,"last_synced_commit":"057f9b68256715112bc501e00f34f7f628e4b961"},"previous_names":[],"tags_count":61,"template":true,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfra-me%2Fgithub-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfra-me%2Fgithub-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfra-me%2Fgithub-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bfra-me%2Fgithub-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bfra-me","download_url":"https://codeload.github.com/bfra-me/github-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248943427,"owners_count":21186958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","github-actions","nodejs","template","typescript"],"created_at":"2024-11-16T06:15:35.544Z","updated_at":"2025-12-29T11:23:43.580Z","avatar_url":"https://github.com/bfra-me.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypeScript GitHub Action Template\n\n[![CI](https://img.shields.io/github/actions/workflow/status/bfra-me/github-action/ci.yaml?branch=main\u0026style=for-the-badge\u0026logo=github-actions\u0026logoColor=white\u0026label=ci)](https://github.com/bfra-me/github-action/actions?query=workflow%3Aci) [![TypeScript](https://img.shields.io/badge/TypeScript-blue?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org) [![License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](LICENSE)\n\n\u003e A production-ready TypeScript template for creating GitHub Actions with modern tooling and best practices.\n\nThis template provides everything you need to build, test, and publish TypeScript-based GitHub Actions. It includes comprehensive tooling for development, testing, linting, and automated publishing workflows.\n\n## Features\n\n- **TypeScript First** - Full TypeScript support with strict type checking\n- **Modern Tooling** - ESLint, Prettier, and Vitest for development workflow\n- **Automated Building** - Uses `tsup` for fast, optimized bundling\n- **Comprehensive Testing** - Unit tests with Vitest and integration testing setup\n- **CI/CD Ready** - GitHub Actions workflow for testing and validation\n- **Zero Dependencies Runtime** - Only uses `@actions/core` for minimal footprint\n\n## Quick Start\n\n### 1. Use This Template\n\nClick **\"Use this template\"** to create a new repository from this template, or clone it directly:\n\n```bash\ngit clone https://github.com/bfra-me/github-action.git my-action\ncd my-action\n```\n\n### 2. Install Dependencies\n\n```bash\npnpm install\n```\n\n### 3. Customize Your Action\n\nUpdate `action.yaml` with your action's metadata:\n\n```yaml\nname: Your Action Name\ndescription: Your action description\nauthor: Your Name\ninputs:\n  your-input:\n    description: Input description\n    required: true\n    default: default value\noutputs:\n  your-output:\n    description: Output description\nruns:\n  using: node20\n  main: dist/index.js\n```\n\n### 4. Implement Your Logic\n\nReplace the example code in `src/main.ts`:\n\n```javascript\nimport * as core from '@actions/core'\n\nasync function run() {\n  try {\n    const input = core.getInput('your-input')\n\n    // Your action logic here\n    const result = `Processed: ${input}`\n\n    core.setOutput('your-output', result)\n  } catch (error) {\n    if (error instanceof Error) {\n      core.setFailed(error.message)\n    }\n  }\n}\n\nawait run()\n```\n\n## Development\n\n### Building\n\n```bash\n# Development build\npnpm run build\n\n# Production build with minification\npnpm run build-release\n```\n\n### Testing\n\n```bash\n# Run all tests\npnpm test\n\n# Type checking\npnpm run check-types\n\n# Linting\npnpm run lint\n\n# Auto-fix linting issues\npnpm run fix\n```\n\n### Local Testing\n\nTest your action locally by setting environment variables and running the built code:\n\n```bash\n# Build the action\npnpm run build\n\n# Set input environment variables\nexport INPUT_MILLISECONDS=1000\n\n# Run the action\nnode dist/index.js\n```\n\n## Example Usage\n\nOnce published, your action can be used in workflows like this:\n\n```yaml\nname: Example Workflow\non: [push, pull_request]\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Run Custom Action\n        uses: your-username/your-action@v1\n        with:\n          milliseconds: 2000\n```\n\n## Publishing Your Action\n\n### 1. Update Package Metadata\n\nUpdate `package.json` with your action's information:\n\n```json\n{\n  \"name\": \"your-action-name\",\n  \"description\": \"Your action description\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git+https://github.com/your-username/your-action.git\"\n  }\n}\n```\n\n### 2. Build and Commit Distribution\n\n```bash\n# Build for production\npnpm run build-release\n\n# Commit the dist folder\ngit add dist/\ngit commit -m \"Add distribution files\"\ngit push\n```\n\n### 3. Create a Release\n\n```bash\n# Tag your release\ngit tag -a v1.0.0 -m \"Initial release\"\ngit push origin v1.0.0\n\n# Create major version tag for easier referencing\ngit tag -a v1 -m \"Version 1\"\ngit push origin v1\n```\n\n\u003e [!TIP]\n\u003e\n\u003e Users can reference your action using `@v1` for the latest v1.x.x release, or `@v1.0.0` for a specific version.\n\n## Project Structure\n\n```text\n├── src/\n│   ├── main.ts          # Main action entry point\n│   └── wait.ts          # Example utility function\n├── __tests__/\n│   └── main.test.ts     # Test files\n├── dist/               # Built distribution files (auto-generated)\n├── action.yaml         # Action metadata\n├── package.json        # Node.js dependencies and scripts\n├── tsconfig.json       # TypeScript configuration\n├── tsup.config.ts      # Build configuration\n└── eslint.config.ts    # ESLint configuration\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/my-feature`\n3. Make your changes and add tests\n4. Run the test suite: `pnpm test`\n5. Commit your changes: `git commit -m \"Add my feature\"`\n6. Push to the branch: `git push origin feature/my-feature`\n7. Submit a pull request\n\n## Example Action (Included)\n\nThis template includes a simple example action that waits for a specified number of milliseconds. This demonstrates:\n\n- Input handling with `@actions/core`\n- Async operations\n- Output setting\n- Error handling\n- TypeScript best practices\n\nYou can test it immediately:\n\n```yaml\n- name: Wait Example\n  uses: ./\n  with:\n    milliseconds: 1000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfra-me%2Fgithub-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbfra-me%2Fgithub-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbfra-me%2Fgithub-action/lists"}