{"id":19909462,"url":"https://github.com/chrisreddington/validate-file-exists","last_synced_at":"2025-09-19T01:33:00.796Z","repository":{"id":261412817,"uuid":"884228592","full_name":"chrisreddington/validate-file-exists","owner":"chrisreddington","description":"A GitHub Action that checks for the existence of a specified list of files.","archived":false,"fork":false,"pushed_at":"2024-12-30T20:15:55.000Z","size":1178,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T14:28:15.379Z","etag":null,"topics":["action","github","quality"],"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/chrisreddington.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-06T11:33:34.000Z","updated_at":"2024-12-23T21:52:05.000Z","dependencies_parsed_at":"2024-11-06T12:48:54.008Z","dependency_job_id":"778ceb43-1fc1-45d2-ae8c-d74188495b86","html_url":"https://github.com/chrisreddington/validate-file-exists","commit_stats":null,"previous_names":["chrisreddington/validate-file-exists"],"tags_count":4,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisreddington%2Fvalidate-file-exists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisreddington%2Fvalidate-file-exists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisreddington%2Fvalidate-file-exists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrisreddington%2Fvalidate-file-exists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrisreddington","download_url":"https://codeload.github.com/chrisreddington/validate-file-exists/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233543217,"owners_count":18691780,"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":["action","github","quality"],"created_at":"2024-11-12T21:15:33.888Z","updated_at":"2025-09-19T01:33:00.760Z","avatar_url":"https://github.com/chrisreddington.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Validate File Exists\n\n[![GitHub Super-Linter](https://github.com/chrisreddington/validate-file-exists/actions/workflows/linter.yml/badge.svg)](https://github.com/chrisreddington/validate-file-exists)\n![CI](https://github.com/chrisreddington/validate-file-exists/actions/workflows/ci.yml/badge.svg)\n[![Check dist/](https://github.com/chrisreddington/validate-file-exists/actions/workflows/check-dist.yml/badge.svg)](https://github.com/chrisreddington/validate-file-exists/actions/workflows/check-dist.yml)\n[![CodeQL](https://github.com/chrisreddington/validate-file-exists/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/chrisreddington/validate-file-exists/actions/workflows/codeql-analysis.yml)\n[![Coverage](./badges/coverage.svg)](./badges/coverage.svg)\n[![Validate Repository Configuration](https://github.com/chrisreddington/validate-file-exists/actions/workflows/baseline.yml/badge.svg)](https://github.com/chrisreddington/validate-file-exists/actions/workflows/baseline.yml)\n\nA GitHub Action that validates whether specified files exist in your repository.\nThis action helps ensure that required files are present before proceeding with\nyour workflow, which is useful for validation steps or pre-deployment checks.\n\n## Inputs\n\n| Input            | Description                                          | Required |\n| ---------------- | ---------------------------------------------------- | -------- |\n| `required-files` | Comma-separated list of files to check for existence | Yes      |\n\n## Outputs\n\n| Output   | Description                         |\n| -------- | ----------------------------------- |\n| `exists` | 'true' if all specified files exist |\n\n## Usage\n\n### Basic Example\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - name: Validate configuration files\n    uses: chrisreddington/validate-file-exists@v0.0.8\n    with:\n      required-files: README.md\n```\n\n### Multiple Files Example\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - name: Validate configuration files\n    uses: chrisreddington/validate-file-exists@v0.0.8\n    with:\n      required-files: 'README.md, .github/copilot-instructions.md'\n```\n\n### Advanced Example with Error Handling\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - name: Validate critical files\n    id: validate\n    uses: chrisreddington/validate-file-exists@v0.0.8\n    with:\n      required-files: 'package.json, tsconfig.json, src/main.ts'\n    continue-on-error: true\n\n  - name: Handle validation failure\n    if: steps.validate.outcome == 'failure'\n    run: |\n      echo \"Critical files are missing - this may affect the build\"\n      exit 1\n```\n\n### Error Handling\n\nIf any of the specified files are missing, the action will:\n\n1. Fail with a detailed error message listing all missing files\n1. Exit with a non-zero status code, which will cause the workflow to fail\n\nExample error message:\n\n```bash\nError: The following files do not exist: config.json, settings.yml\n```\n\n### Input Validation\n\nThe action validates input parameters and provides clear error messages for\ncommon issues:\n\n- **Empty input**: Throws error if no files are specified\n- **Invalid format**: Handles cases with only commas or whitespace\n- **File filtering**: Automatically filters out empty entries from\n  comma-separated lists\n\nExample validation errors:\n\n```bash\nError: Input cannot be empty. Please provide a comma-separated list of files to validate.\nError: No valid files found in input. Please provide a comma-separated list of\nfile names.\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file\nfor details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisreddington%2Fvalidate-file-exists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrisreddington%2Fvalidate-file-exists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrisreddington%2Fvalidate-file-exists/lists"}