{"id":22862399,"url":"https://github.com/dylibso/xtp-ci-demo","last_synced_at":"2025-03-31T08:46:07.276Z","repository":{"id":263504872,"uuid":"867356359","full_name":"dylibso/xtp-ci-demo","owner":"dylibso","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-20T23:23:41.000Z","size":206,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-06T13:19:47.388Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/dylibso.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}},"created_at":"2024-10-03T22:56:41.000Z","updated_at":"2024-11-20T23:23:44.000Z","dependencies_parsed_at":"2024-11-19T06:32:30.998Z","dependency_job_id":null,"html_url":"https://github.com/dylibso/xtp-ci-demo","commit_stats":null,"previous_names":["dylibso/xtp-ci-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fxtp-ci-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fxtp-ci-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fxtp-ci-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylibso%2Fxtp-ci-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylibso","download_url":"https://codeload.github.com/dylibso/xtp-ci-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443524,"owners_count":20778247,"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":"2024-12-13T10:13:27.494Z","updated_at":"2025-03-31T08:46:07.235Z","avatar_url":"https://github.com/dylibso.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xtp-ci\n\nA CI workflow using [XTP](https://www.getxtp.com/) and [Extism](https://github.com/extism/extism)\n\n## Github\n\nTo use xtp-ci from Github actions, add the following to your workflow:\n\n```\n- uses: dylibso/xtp-ci-demo@main\n  with:\n    action: checkRepo\n    token: ${{ secrets.XTP_TOKEN }}\n    appId: ${{ secrets.XTP_APP_ID }}\n    guestKey: myGuestKey\n    binding: my-binding-name\n```\n\n\n## Gitlab\n\nTo use xtp-ci from Gitlab CI, add the following to your configuration file:\n\n```\ninclude:\n  - component: $CI_SERVER_FQDN/zshipko/xtp-ci@main\n    inputs:\n      token: $XTP_TOKEN\n      appId: $XTP_APP_ID\n      guestKey: myGuestKey\n      binding: my-binding-name\n```\n\n(in this example $XTP_TOKEN and $XTP_APP_ID are Gitlab CI variables)\n\n## Local\n\nCreate a `.env` file with the following environment variables:\n\n```\nXTP_TOKEN=\"\"\nXTP_GUEST_KEY=\"\"\nXTP_APP_ID=\"\"\nXTP_BINDING_NAME=\"\"\n```\n\nThen you can run:\n\n```\nnode dist/index.js {scanFiles|checkRepo}\n```\n\n## Writing a plugin\n\nThere are two different operations that can be implemented in a plugin.\n\n- `scanFiles` receives `RepoInfo` as input with `inputFile` populated, it will\n  be called once for each file. Returning an error `CheckResult` (where `result.status = \"error\"`)\n  will cause the action to fail.\n- `checkRepo` receives `RepoInfo` as input with no `inputFile` and is called once\n  for the entire repo. Like, `scanFiles` returning an error `CheckResult` will\n  cause the action to fail. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylibso%2Fxtp-ci-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylibso%2Fxtp-ci-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylibso%2Fxtp-ci-demo/lists"}