{"id":21315965,"url":"https://github.com/cifriends/typescript-action-template","last_synced_at":"2025-07-21T09:32:11.653Z","repository":{"id":238181974,"uuid":"793981508","full_name":"CIFriends/typescript-action-template","owner":"CIFriends","description":"A TypeScript-based GitHub Action template","archived":false,"fork":false,"pushed_at":"2025-07-10T19:33:59.000Z","size":987,"stargazers_count":5,"open_issues_count":16,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T05:06:34.147Z","etag":null,"topics":["actions","cicd","collaborate","github-action","github-actions","github-codespaces","github-copilot","runner","student-vscode","tech","typescript-template","workflow","workflow-templates"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CIFriends.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-30T08:28:15.000Z","updated_at":"2025-03-21T23:37:49.000Z","dependencies_parsed_at":"2024-05-20T23:29:05.858Z","dependency_job_id":"d47f70c7-fe94-4142-bec1-feb88c292de2","html_url":"https://github.com/CIFriends/typescript-action-template","commit_stats":null,"previous_names":["brenoepics/typescript-action-template","cifriends/typescript-action-template"],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/CIFriends/typescript-action-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIFriends%2Ftypescript-action-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIFriends%2Ftypescript-action-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIFriends%2Ftypescript-action-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIFriends%2Ftypescript-action-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CIFriends","download_url":"https://codeload.github.com/CIFriends/typescript-action-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CIFriends%2Ftypescript-action-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264923080,"owners_count":23683716,"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","cicd","collaborate","github-action","github-actions","github-codespaces","github-copilot","runner","student-vscode","tech","typescript-template","workflow","workflow-templates"],"created_at":"2024-11-21T18:28:46.850Z","updated_at":"2025-07-12T01:31:32.589Z","avatar_url":"https://github.com/CIFriends.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Action Template\n\n\u003e [!NOTE]\n\u003e Docs: [docs.github.com](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action)\n\nThis repository contains a template for creating a GitHub Action using\nTypeScript. It includes a set of workflows that automate the process of testing,\nbuilding, and checking the code.\n\n## Action Details\n\nThe main entry point for the action is `src/index.ts`, which imports and runs\nthe `run` function from `src/main.ts`. This function retrieves an input named\n\"who-to-greet\" and then sets an output named hello with the value \"Hello,\n\u003cwho-to-greet\u003e!\".\n\n## Development\n\nThe code is written in TypeScript and transpiled to JavaScript for distribution.\nThe `tsconfig.json` file contains the TypeScript compiler options. The\n`package.json` file contains various scripts for formatting, linting, testing,\nand building the code. The `preinstall` script ensures that `pnpm` is used as\nthe package manager.\n\n## Usage\n\nTo use this action in a workflow, you can reference it with the `uses` keyword\nand the path to the repository. You can also specify inputs with the `with`\nkeyword. For example:\n\n```yaml\nsteps:\n  - name: Example Step\n    uses: ./ # Uses an action in the root directory, if you push this repository to GitHub, you can use the following: uses: \u003cusername\u003e/typescript-action-template@v1\n    with:\n      who-to-greet: \"Mona the Octocat\"\n```\n\nThis will run the action with the input `who-to-greet` set to \"Mona the Octocat\"\n\n## Adding Inputs and Outputs\n\n\u003e [!NOTE]\n\u003e Docs: [docs.github.com](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions)\n\nTo add inputs and outputs to your GitHub Action, you need to define them in the\n`action.yml` file. Inputs are defined under the `inputs` field and outputs under\nthe `outputs` field. Each input or output has a unique ID, a description, and\nother optional properties. For example, an input could be defined as follows:\n\n```yaml\ninputs:\n  my-input:\n    description: \"Description of the input\"\n    required: true\n    default: \"Default value\"\n```\n\nAnd an output could be defined as follows:\n\n```yaml\noutputs:\n  my-output:\n    description: \"Description of the output\"\n```\n\nIn your TypeScript code, you can use the `core.getInput` function from the\n`@actions/core` package to retrieve the value of an input, and the\n`core.setOutput` function to set the value of an output.\n\n## Running the Action Locally\n\n\u003e [!TIP] \n\u003e If you don't want to install `act` on your environment, you can use GitHub Codespaces to run the action.\n\n### Nektos/act\n\n\u003e [!NOTE]\n\u003e Docs: [Nektos](https://nektosact.com/introduction.html)\n\nInstall [Nektos/act](https://github.com/nektos/act) and run the following\ncommand:\n\n```bash\nact push -W .github/workflows/ci.yml\n```\n\n## Workflows\n\nThere are several workflows defined in the `.github/workflows` directory:\n\n- `ci.yml`: This workflow runs on every push or pull request to the `main`\n  branch. It checks out the code, installs dependencies using `pnpm`, checks the\n  code formatting, lints the code, runs tests, and then runs the action with a\n  greeting.\n\n- `check-dist.yml`: This workflow also runs on every push or pull request to the\n  `main` branch. It checks out the code, installs dependencies, builds the\n  `dist/` directory, and then checks if the `dist/` directory matches the\n  expected output. If it doesn't, the workflow fails and uploads the expected\n  `dist/` directory as a workflow artifact.\n\n- `codeql-analysis.yml`: This workflow runs on every push or pull request to the\n  `main` branch, as well as on a schedule. It checks out the code, initializes\n  CodeQL with the TypeScript language, auto builds the code, and then performs a\n  CodeQL analysis.\n\n## Dependencies\n\nThe action uses the `@actions/core` and `@actions/github` packages as\ndependencies. The `@actions/core` package provides functions for getting inputs\nand setting outputs, among other things. The `@actions/github` package provides\nGitHub-related functionality.\n\n## License\n\nThis project is licensed under Apache-2.0. See the [LICENSE](LICENSE) file for\ndetails.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcifriends%2Ftypescript-action-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcifriends%2Ftypescript-action-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcifriends%2Ftypescript-action-template/lists"}