{"id":49225422,"url":"https://github.com/tonicai/structural-workspace-search","last_synced_at":"2026-04-24T07:01:50.181Z","repository":{"id":289146565,"uuid":"970271891","full_name":"TonicAI/structural-workspace-search","owner":"TonicAI","description":"A Github Action to search through your Tonic Structural workspaces","archived":false,"fork":false,"pushed_at":"2025-04-30T21:11:56.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-30T22:24:41.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/TonicAI.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":"2025-04-21T18:50:15.000Z","updated_at":"2025-04-30T21:10:09.000Z","dependencies_parsed_at":"2025-04-22T04:41:39.885Z","dependency_job_id":null,"html_url":"https://github.com/TonicAI/structural-workspace-search","commit_stats":null,"previous_names":["tonicai/structural-github-action-workspace-search","tonicai/structural-workspace-search"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/TonicAI/structural-workspace-search","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Fstructural-workspace-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Fstructural-workspace-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Fstructural-workspace-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Fstructural-workspace-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TonicAI","download_url":"https://codeload.github.com/TonicAI/structural-workspace-search/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TonicAI%2Fstructural-workspace-search/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32212808,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-04-24T07:01:49.426Z","updated_at":"2026-04-24T07:01:50.169Z","avatar_url":"https://github.com/TonicAI.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workspace Search\n\nThis action searches for workspaces using the Structural API and returns workspace IDs and names.\n\n## Inputs\n\n- `api_key` (required): Structural API key for authentication\n- `api_url` (optional): Structural API base URL, defaults to 'https://app.tonic.ai'\n- `search_term` (optional): Term to search for in workspace names\n- `database_types` (optional): Comma-separated list of database types to filter by (e.g., \"Postgres,MySql\")\n- `tags` (optional): Comma-separated list of tags to filter by (e.g., \"production,test\")\n- `owner_id` (optional): Filter workspaces by owner ID\n\n## Outputs\n\n- `workspaces_json`: JSON string containing workspace IDs and names in GitHub Actions matrix-ready format: `{\"workspaces\": [{\"id\":\"...\",\"name\":\"...\"},...]}`\n- `workspaces_count`: Number of workspaces found\n\n## Example Usage\n\n### Basic Usage\n\n```yaml\njobs:\n  search-workspaces:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Search Workspaces\n        id: search\n        uses: TonicAI/structural-workspace-search@v1\n        with:\n          api_key: ${{ secrets.STRUCTURAL_API_KEY }}\n\n      - name: Print Workspace Count\n        run: echo \"Found ${{ steps.search.outputs.workspaces_count }} workspaces\"\n```\n\n### Using the Search Results\n\n```yaml\njobs:\n  search-and-process:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v4\n\n      - name: Search Workspaces\n        id: search\n        uses: TonicAI/structural-workspace-search@v1\n        with:\n          api_key: ${{ secrets.STRUCTURAL_API_KEY }}\n          search_term: \"production\"\n          database_types: \"Postgres,MySQL\"\n          tags: \"prod,critical\"\n          owner_id: \"00000000-0000-0000-0000-000000000000\"\n\n      - name: Process Search Results\n        run: |\n          # Parse the JSON string to a variable\n          WORKSPACES='${{ steps.search.outputs.workspaces_json }}'\n\n          # Process the workspaces using jq\n          echo \"$WORKSPACES\" | jq -c '.workspaces[]' | while read -r workspace; do\n            id=$(echo \"$workspace\" | jq -r '.id')\n            name=$(echo \"$workspace\" | jq -r '.name')\n            echo \"Processing workspace: $name ($id)\"\n\n            # Do something with each workspace...\n          done\n```\n\n### Using Results with GitHub Actions Matrix Strategy\n\nYou can use the search results to dynamically create a matrix of workspaces for parallel job execution:\n\n```yaml\njobs:\n  # First job to search for workspaces\n  search-workspaces:\n    runs-on: ubuntu-latest\n    outputs:\n      matrix: ${{ steps.create-matrix.outputs.matrix }}\n      workspace_count: ${{ steps.search.outputs.workspaces_count }}\n    steps:\n      - name: Search Workspaces\n        id: search\n        uses: TonicAI/structural-workspace-search@v1\n        with:\n          api_key: ${{ secrets.STRUCTURAL_API_KEY }}\n          tags: \"prod\" # Only search for production workspaces\n\n      - name: Set Matrix Output\n        id: create-matrix\n        run: |\n          echo \"matrix\u003c\u003cEOF\" \u003e\u003e $GITHUB_OUTPUT\n          echo '${{ steps.search.outputs.workspaces_json }}' \u003e\u003e $GITHUB_OUTPUT\n          echo \"EOF\" \u003e\u003e $GITHUB_OUTPUT\n          echo \"Found ${{ steps.search.outputs.workspaces_count }} workspaces for matrix\"\n\n  # Second job that uses the matrix to run tasks in parallel\n  process-workspaces:\n    needs: search-workspaces\n    if: needs.search-workspaces.outputs.workspace_count \u003e 0\n    runs-on: ubuntu-latest\n    strategy:\n      matrix: ${{ fromJson(needs.search-workspaces.outputs.matrix) }}\n      fail-fast: false # Continue with other workspaces if one fails\n    name: Process ${{ matrix.workspaces.name }}\n    steps:\n      - name: Start Generation Job\n        id: start-job\n        uses: TonicAI/structural-start-job@v1\n        with:\n          workspace_id: ${{ matrix.workspaces.id }}\n          api_key: ${{ secrets.STRUCTURAL_API_KEY }}\n          strict_mode: \"RejectOnSchemaActions\"\n\n      - name: Print Job Details\n        run: |\n          echo \"Started generation job for workspace: ${{ matrix.workspaces.name }}\"\n          echo \"Job ID: ${{ steps.start-job.outputs.job_id }}\"\n```\n\nThis setup allows you to:\n1. Search for a set of workspaces that match specific criteria\n2. Automatically create a GitHub Actions matrix from those workspaces\n3. Run parallel jobs for each workspace\n4. Each parallel job has access to both the workspace ID and name","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonicai%2Fstructural-workspace-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftonicai%2Fstructural-workspace-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftonicai%2Fstructural-workspace-search/lists"}