{"id":27459715,"url":"https://github.com/mcascone/typescript-action-leonardo","last_synced_at":"2025-06-15T22:07:28.600Z","repository":{"id":242947639,"uuid":"811026351","full_name":"mcascone/typescript-action-leonardo","owner":"mcascone","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-06T19:56:26.000Z","size":792,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-15T20:46:02.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcascone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-06-05T19:54:58.000Z","updated_at":"2024-06-06T19:56:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"37e45556-a419-444d-b47b-f5f491c913b8","html_url":"https://github.com/mcascone/typescript-action-leonardo","commit_stats":null,"previous_names":["mcascone/typescript-action-leonardo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mcascone/typescript-action-leonardo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcascone%2Ftypescript-action-leonardo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcascone%2Ftypescript-action-leonardo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcascone%2Ftypescript-action-leonardo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcascone%2Ftypescript-action-leonardo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcascone","download_url":"https://codeload.github.com/mcascone/typescript-action-leonardo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcascone%2Ftypescript-action-leonardo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260059124,"owners_count":22953048,"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":[],"created_at":"2025-04-15T20:23:58.340Z","updated_at":"2025-06-15T22:07:28.590Z","avatar_url":"https://github.com/mcascone.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typescript-actions-learning\n\nFollowing along with \u003chttps://dev.to/balastrong/create-a-custom-github-action-in-typescript-21ad\u003e\n\n_Hey, ts actions might be cool!_\n\n## Dev Worklow Notes\n\n### Changes require builds\n\nWhen you make changes to the action, you need to rebuild it.\n\n```bash\nnpm run package\n\n# you'll be doing this a lot, so i recommend an alias:\nalias nrp='npm run package'\n\n# For permanence, set aliases in your ~/.bashrc or wherever your profile is.\n```\n\n\u003e Note! The `package` script is defined in the `package.json` file. It runs a `build` script with several options. You may need to adjust based on your build process.\n\n## Testing with ACT\n`act` is a tool that allows you to run GitHub actions locally. It's a great way to test your actions before you push them to GitHub.\n\nImportant! Any actions you take using the github octokit will actually be performed on the given repository. Be careful!\n\n## Install into the GitHub cli\n\n```bash\n# obviously requires the gh cli to be installed:\nbrew install gh\n\n# then install the act extension\ngh extension install act\nv\n# you can also install act directly with homebrew:\n# brew install act\n# I don't know why, it just feels more 'right' to install it and have it coexist with gh\n```\n\n## Run the action\n\n```bash\n# The container arch param quiets a warning about the architecture of the act container on MacOS.\n# The token param is automatically provided when running on GitHub, but you need to provide it locally.\n# The gh cli is used to get the token.\n\ngh act --container-architecture=linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"\n\n# I recommend you make an alias for this:\nalias act='gh act --container-architecture=linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"'\n```\n\n## Configure local environment for testing events\n\nFor testing PRs and other events, we have to provide a payload file. This is a JSON file that contains the event data that would be sent to the action by GitHub.\n\nIn this example, we're testing a PR event. The payload file looks like this. I just picked the top two commits and set the PR number to 1:\n\n```json\n{\n  \"pull_request\": {\n    \"head\": {\n      \"ref\": \"db1d7aa0d264edc6a44652b684685170097491ce\"\n    },\n    \"base\": {\n      \"ref\": \"4aa71d7cd863bbc0941a79f64e3b1bfcb91e904b\"\n    },\n    \"number\": 1\n  }\n}\n```\n\nThen, you can run the action with the event data:\n\n```bash\n# using the alias from above\n# don't forget to rebuild after any .ts changes\nact -e event.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcascone%2Ftypescript-action-leonardo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcascone%2Ftypescript-action-leonardo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcascone%2Ftypescript-action-leonardo/lists"}