{"id":16554748,"url":"https://github.com/j178/github-s3","last_synced_at":"2025-03-21T10:32:18.597Z","repository":{"id":186397825,"uuid":"675111169","full_name":"j178/github-s3","owner":"j178","description":"GitHub as a file server","archived":true,"fork":false,"pushed_at":"2025-02-10T11:26:45.000Z","size":39,"stargazers_count":52,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T17:14:12.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/j178.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}},"created_at":"2023-08-05T20:17:56.000Z","updated_at":"2025-02-13T07:29:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"537f3c99-ecd0-402f-ad13-9dec7c31934c","html_url":"https://github.com/j178/github-s3","commit_stats":null,"previous_names":["j178/github-s3"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j178%2Fgithub-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j178%2Fgithub-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j178%2Fgithub-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j178%2Fgithub-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j178","download_url":"https://codeload.github.com/j178/github-s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244135939,"owners_count":20403798,"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-10-11T19:52:14.376Z","updated_at":"2025-03-21T10:32:18.290Z","avatar_url":"https://github.com/j178.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub as a file server \n\nAbuse GitHub unpublicized [attachment](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files) API to serve a file.\n\nEspecially useful for hosting image files that can be referenced in markdown files.\n\n## Usage\n\n1. Install\n    ```shell\n    brew install j178/tap/github-s3\n    # or\n    go install github.com/j178/github-s3/cmd/github-s3@latest\n    ```\n2. Login to your GitHub account, and obtain cookie named `user_session` from GitHub web browser session.\n3. Run\n    ```shell\n    export GITHUB_SESSION=\u003cgithub-user-session\u003e   \n    github-s3 \u003cpath-to-file\u003e\n    ```\n\nIf you don't want to obtain the cookie manually, you can use [github-s3-auto](./cmd/github-s3-auto) to automatically find the cookie from your web browser session.\n\n```shell\ngo install github.com/j178/github-s3/cmd/github-s3-auto@latest\n\ngithub-s3-auto \u003cpath-to-file\u003e\n```\n\n### Use in GitHub Actions\n\n```yaml\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Upload files to GitHub\n        uses: j178/github-s3@v1\n        with:\n          files: \u003clist-of-paths-to-file\u003e\n          github-session: ${{ secrets.GH_SESSION }}\n      - name: Use uploaded files\n        run: |\n            # Use the uploaded files\n        with:\n         files: ${{ steps.upload.outputs.links }}\n```\n\n## Disclaimer\n\nPlease note that this project relies on an unpublicized API of GitHub, and its usage may be subject to changes in GitHub's policies or API. Use it responsibly and ensure compliance with GitHub's terms of service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj178%2Fgithub-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj178%2Fgithub-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj178%2Fgithub-s3/lists"}