{"id":22518057,"url":"https://github.com/actalog/expect","last_synced_at":"2026-05-05T13:38:13.735Z","repository":{"id":250453980,"uuid":"834495962","full_name":"actalog/expect","owner":"actalog","description":"✅ Assertion for GitHub Actions","archived":false,"fork":false,"pushed_at":"2025-05-25T20:32:02.000Z","size":1784,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-25T05:42:08.960Z","etag":null,"topics":["actions","github","javascript","regex","validation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actalog.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-27T12:49:50.000Z","updated_at":"2025-05-25T20:31:54.000Z","dependencies_parsed_at":"2024-11-01T14:26:35.818Z","dependency_job_id":"41a8a49f-69ed-431f-83f3-c426670bdb57","html_url":"https://github.com/actalog/expect","commit_stats":null,"previous_names":["gabrielrufino/expect-action","actalog/expect-action","actalog/expect"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/actalog/expect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actalog%2Fexpect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actalog%2Fexpect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actalog%2Fexpect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actalog%2Fexpect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actalog","download_url":"https://codeload.github.com/actalog/expect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actalog%2Fexpect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261983734,"owners_count":23240219,"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","javascript","regex","validation"],"created_at":"2024-12-07T04:14:01.163Z","updated_at":"2026-05-05T13:38:13.730Z","avatar_url":"https://github.com/actalog.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @actalog/expect\n\n[![CI](https://github.com/actalog/expect/actions/workflows/ci.yml/badge.svg)](https://github.com/actalog/expect/actions/workflows/ci.yml)\n[![CD](https://github.com/actalog/expect/actions/workflows/cd.yml/badge.svg)](https://github.com/actalog/expect/actions/workflows/cd.yml)\n\nA lightweight and flexible set of validators for GitHub Actions. Ensure your inputs, secrets, and outputs meet specific criteria before proceeding with your workflow, preventing unexpected errors downstream.\n\n---\n\n## 🚀 Features\n\n- **✅ Regex Validation**: Powerful pattern matching for complex string formats like emails, versions, or custom identifiers.\n- **📋 Enum Validation**: Restrict values to a specific set of allowed options, ideal for environment names, deployment targets, etc.\n- **🛡️ Fail Fast**: Stop workflows immediately when validation fails, saving time and resources.\n\n## 📖 Usage\n\n### Regex Validation\n\nPerfect for validating string formats like email addresses, phone numbers, or semantic versions.\n\n```yaml\nname: Regex Validation Example\n\non:\n  workflow_dispatch:\n    inputs:\n      email:\n        description: Email to validate\n        required: true\n\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Validate Email\n        uses: actalog/expect@v1\n        with:\n          type: regex\n          value: ${{ github.event.inputs.email }}\n          pattern: '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$'\n```\n\n### Enum Validation\n\nUseful for ensuring that a value belongs to a predefined list of valid options.\n\n```yaml\nname: Enum Validation Example\n\non:\n  workflow_dispatch:\n    inputs:\n      environment:\n        description: Environment to deploy\n        required: true\n\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Validate Environment\n        uses: actalog/expect@v1\n        with:\n          type: enum\n          value: ${{ github.event.inputs.environment }}\n          options: 'staging,production,beta'\n```\n\n## 🛠️ Inputs\n\n| Input     | Description                                                              | Required |\n| :-------- | :----------------------------------------------------------------------- | :------: |\n| `type`    | The validator to use. Supported: `regex`, `enum`.                        |  **Yes** |\n| `value`   | The string value to be validated.                                        |  **Yes** |\n| `pattern` | The regular expression pattern (required if `type` is `regex`).          |    No    |\n| `options` | A comma-separated list of allowed values (required if `type` is `enum`). |    No    |\n\n## 💻 Development\n\n### Setup\n\n```bash\nnpm install\n```\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Linting\n\n```bash\nnpm run lint\n```\n\n## 📄 License\n\nThis project is released into the public domain under the [Unlicense](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factalog%2Fexpect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factalog%2Fexpect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factalog%2Fexpect/lists"}