{"id": 136890, "seq": 5, "job": {"value": 27470, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Run tests", "with": null, "run": "pytest\n", "env": null, "if": null} {"id": 136889, "seq": 4, "job": {"value": 27470, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Install dependencies", "with": null, "run": "pip install -e '.[test]'\n", "env": null, "if": null} {"id": 136888, "seq": 3, "job": {"value": 27470, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/cache@v2", "name": "Configure pip caching", "with": "{\"path\": \"~/.cache/pip\", \"key\": \"${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}\", \"restore-keys\": \"${{ runner.os }}-pip-\\n\"}", "run": null, "env": null, "if": null} {"id": 136887, "seq": 2, "job": {"value": 27470, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/setup-python@v2", "name": "Set up Python ${{ matrix.python-version }}", "with": "{\"python-version\": \"${{ matrix.python-version }}\"}", "run": null, "env": null, "if": null} {"id": 136886, "seq": 1, "job": {"value": 27470, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/checkout@v2", "name": null, "with": null, "run": null, "env": null, "if": null} {"id": 136885, "seq": 3, "job": {"value": 27469, "label": "build"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Commit and push if README changed", "with": null, "run": "git diff\ngit config --global user.email \"readme-bot@example.com\"\ngit config --global user.name \"README-bot\"\ngit diff --quiet || (git add README.md && git commit -m \"Updated README\")\ngit push", "env": null, "if": null} {"id": 136884, "seq": 2, "job": {"value": 27469, "label": "build"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Update TOC", "with": null, "run": "npx markdown-toc README.md -i", "env": null, "if": null} {"id": 136883, "seq": 1, "job": {"value": 27469, "label": "build"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/checkout@v2", "name": "Check out repo", "with": null, "run": null, "env": null, "if": null} {"id": 136882, "seq": 5, "job": {"value": 27468, "label": "deploy"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Publish", "with": null, "run": "python setup.py sdist bdist_wheel\ntwine upload dist/*\n", "env": "{\"TWINE_USERNAME\": \"__token__\", \"TWINE_PASSWORD\": \"${{ secrets.PYPI_TOKEN }}\"}", "if": null} {"id": 136881, "seq": 4, "job": {"value": 27468, "label": "deploy"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Install dependencies", "with": null, "run": "pip install setuptools wheel twine\n", "env": null, "if": null} {"id": 136880, "seq": 3, "job": {"value": 27468, "label": "deploy"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/cache@v2", "name": "Configure pip caching", "with": "{\"path\": \"~/.cache/pip\", \"key\": \"${{ runner.os }}-publish-pip-${{ hashFiles('**/setup.py') }}\", \"restore-keys\": \"${{ runner.os }}-publish-pip-\\n\"}", "run": null, "env": null, "if": null} {"id": 136879, "seq": 2, "job": {"value": 27468, "label": "deploy"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/setup-python@v2", "name": "Set up Python", "with": "{\"python-version\": \"3.11\"}", "run": null, "env": null, "if": null} {"id": 136878, "seq": 1, "job": {"value": 27468, "label": "deploy"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/checkout@v2", "name": null, "with": null, "run": null, "env": null, "if": null} {"id": 136877, "seq": 5, "job": {"value": 27467, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Run tests", "with": null, "run": "pytest\n", "env": null, "if": null} {"id": 136876, "seq": 4, "job": {"value": 27467, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Install dependencies", "with": null, "run": "pip install -e '.[test]'\n", "env": null, "if": null} {"id": 136875, "seq": 3, "job": {"value": 27467, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/cache@v2", "name": "Configure pip caching", "with": "{\"path\": \"~/.cache/pip\", \"key\": \"${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}\", \"restore-keys\": \"${{ runner.os }}-pip-\\n\"}", "run": null, "env": null, "if": null} {"id": 136874, "seq": 2, "job": {"value": 27467, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/setup-python@v2", "name": "Set up Python ${{ matrix.python-version }}", "with": "{\"python-version\": \"${{ matrix.python-version }}\"}", "run": null, "env": null, "if": null} {"id": 136873, "seq": 1, "job": {"value": 27467, "label": "test"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/checkout@v2", "name": null, "with": null, "run": null, "env": null, "if": null} {"id": 136872, "seq": 11, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Deploy to Cloud Run", "with": null, "run": "gcloud config set run/region us-central1\ngcloud config set project datasette-222320\ndatasette publish cloudrun github.db \\\n -m demo-metadata.json \\\n --service github-to-sqlite \\\n --install=datasette-search-all>=0.3 \\\n --install=datasette-render-markdown>=1.1.2 \\\n --install=datasette-pretty-json>=0.2.2 \\\n --install=datasette-json-html \\\n --install=datasette-vega \\\n --install=datasette-render-images \\\n --install=datasette-graphql \\\n --install=datasette-atom", "env": null, "if": null} {"id": 136871, "seq": 10, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "google-github-actions/setup-gcloud@v0", "name": "Set up Cloud Run", "with": "{\"version\": \"318.0.0\", \"service_account_email\": \"${{ secrets.GCP_SA_EMAIL }}\", \"service_account_key\": \"${{ secrets.GCP_SA_KEY }}\"}", "run": null, "env": null, "if": null} {"id": 136870, "seq": 9, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/upload-artifact@v2", "name": null, "with": "{\"path\": \"github.db\"}", "run": null, "env": null, "if": null} {"id": 136869, "seq": 8, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Fetch releases, commits, issues, contributors", "with": null, "run": "sqlite-utils github.db \"select full_name from repos where owner = 53015001 union select 'simonw/datasette' as full_name union select 'simonw/sqlite-utils' as full_name\" \\\n --csv --no-headers | while read repo;\n do github-to-sqlite releases \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite commits \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite tags \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite contributors \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite issues \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite pull-requests \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite issue-comments \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite stargazers \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n github-to-sqlite workflows \\\n github.db $(echo $repo | tr -d '\\r');\n sleep 10;\n done;\n# Scrape dependents\ngithub-to-sqlite scrape-dependents github.db simonw/datasette simonw/sqlite-utils -v\nsqlite-utils tables --counts github.db\n# Delete email addresses from raw_authors\nsqlite-utils github.db \"update raw_authors set email = ''\"\n# Fetch emojis\ngithub-to-sqlite emojis github.db --fetch\n# Rebuild FTS tables\nsqlite-utils rebuild-fts github.db\n# Populate _analyze_tables_ table\nsqlite-utils analyze-tables github.db --save", "env": null, "if": null} {"id": 136868, "seq": 7, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Fetch the repos", "with": null, "run": "github-to-sqlite repos github.db dogsheep\nsqlite-utils tables --counts github.db", "env": null, "if": null} {"id": 136867, "seq": 6, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Fetch previous copy of database", "with": null, "run": "# So we can keep track of when we first saw each dependent repo\nwget https://github-to-sqlite.dogsheep.net/github.db", "env": null, "if": "!contains(github.event.head_commit.message, 'REFRESH_DB')"} {"id": 136866, "seq": 5, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Create auth.json", "with": null, "run": "echo \"{\\\"github_personal_token\\\": \\\"$GITHUB_ACCESS_TOKEN\\\"}\" > auth.json\n", "env": "{\"GITHUB_ACCESS_TOKEN\": \"${{ secrets.GH_TOKEN }}\"}", "if": null} {"id": 136865, "seq": 4, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": null, "name": "Install Python dependencies", "with": null, "run": "python -m pip install --upgrade pip\npip install sqlite-utils>=3.1\nsqlite-utils --version\npip install -e .\npip install datasette\npip install bs4\n", "env": null, "if": null} {"id": 136864, "seq": 3, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/cache@v1", "name": "Configure pip caching", "with": "{\"path\": \"~/.cache/pip\", \"key\": \"${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}\", \"restore-keys\": \"${{ runner.os }}-pip-\\n\"}", "run": null, "env": null, "if": null} {"id": 136863, "seq": 2, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/setup-python@v1", "name": "Set up Python", "with": "{\"python-version\": \"3.9\"}", "run": null, "env": null, "if": null} {"id": 136862, "seq": 1, "job": {"value": 27466, "label": "scheduled"}, "repo": {"value": 207052882, "label": "github-to-sqlite"}, "uses": "actions/checkout@v2", "name": "Check out repo", "with": null, "run": null, "env": null, "if": null}