{"id":28414361,"url":"https://github.com/xcube-studio/sync2oss","last_synced_at":"2026-01-10T16:07:33.893Z","repository":{"id":271654498,"uuid":"912417557","full_name":"Xcube-Studio/Sync2Oss","owner":"Xcube-Studio","description":"Sync2OSS is a tool for synchronizing files to Alibaba Cloud OSS, supporting both GitHub Actions and command-line usage.","archived":false,"fork":false,"pushed_at":"2025-05-03T03:08:30.000Z","size":204322,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"v2","last_synced_at":"2025-06-25T06:42:51.805Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","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/Xcube-Studio.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-01-05T14:19:52.000Z","updated_at":"2025-05-03T03:14:35.000Z","dependencies_parsed_at":"2025-01-09T04:41:54.582Z","dependency_job_id":"1004d73a-9470-4680-83fd-84df11d04691","html_url":"https://github.com/Xcube-Studio/Sync2Oss","commit_stats":null,"previous_names":["xcube-studio/sync2oss"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Xcube-Studio/Sync2Oss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcube-Studio%2FSync2Oss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcube-Studio%2FSync2Oss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcube-Studio%2FSync2Oss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcube-Studio%2FSync2Oss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xcube-Studio","download_url":"https://codeload.github.com/Xcube-Studio/Sync2Oss/tar.gz/refs/heads/v2","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xcube-Studio%2FSync2Oss/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263617728,"owners_count":23489529,"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":"2025-06-03T08:14:49.524Z","updated_at":"2025-07-04T20:39:55.288Z","avatar_url":"https://github.com/Xcube-Studio.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sync2OSS\n\n### Also available in [English Version](./readme_en.md)\n\n## 简介\n\nSync2OSS 是一个用于将文件同步到阿里云 OSS 的工具，支持通过 GitHub Actions 以及命令行两种方式使用。当前仅支持阿里云 OSS 作为对象存储服务提供商。\n\n## 功能特性\n\n- 支持通过 GitHub Actions 自动同步文件到阿里云 OSS\n- 支持命令行参数灵活上传本地文件/文件夹或 GitHub Release 资源\n- 支持软链接（Symlink）功能\n- 可自定义保留版本数量、目标目录等参数\n- 日志详细，便于排查问题\n\n## 版本说明\n\n- **v2**：始终跟随 v2 分支实时更新，适合需要最新特性和修复的用户。\n- **Release Tag**：可在 Release 页面查看并选择具体 tag，获得稳定的固定版本。\n\n\u003e 推荐生产环境使用 Release Tag 版本，保持更新可选用 v2。\n\n## 使用方法\n\n### 1. 作为 GitHub Action 使用\n\n**示例 workflow:**\n```yaml\n- name: Sync to Aliyun OSS\n  uses: xcube-studio/sync2oss@v2\n  with:\n    accessKeyId: ${{ secrets.OSS_ACCESS_KEY_ID }}\n    accessKeySecret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}\n    endpoint: oss-cn-example.aliyuncs.com\n    bucketName: my-bucket\n    fromRelease: true\n    repoUrl: yourusername/repo\n    isPre: false\n    keepCount: 2\n    addSymlink: false\n    region: cn-shanghai\n```\n\u003e 更多参数说明请查阅 [`action.yml`](./action.yml)。\n\n### 2. 命令行方式使用\n\n你也可以在本地或 CI 环境中直接构建并运行 `src` 目录下的可执行文件。\n\n**构建命令：**\n```bash\ncd src\ndotnet build -c Release -o build\n```\n\n**运行示例：**\n```bash\n# Windows\nbuild\\Sync2Oss.exe --accessKeyId xxx --accessKeySecret xxx --endpoint xxx --bucketName xxx --fromRelease true --repoUrl yourusername/repo\n\n# Linux/macOS\nchmod +x build/Sync2Oss\n./build/Sync2Oss --accessKeyId xxx --accessKeySecret xxx --endpoint xxx --bucketName xxx --fromRelease true --repoUrl yourusername/repo\n```\n\n## 使用方式说明\n\nSync2OSS 支持两种上传方式：\n\n- **fromRelease 为 True**：自动拉取并上传 GitHub 仓库的最新 Release 资源，无需指定 localPath 和 remoteDir。\n- **fromRelease 为 False**：根据 localPath 和 remoteDir 参数，将本地指定文件/文件夹上传到 OSS 的指定目录。\n\n请根据实际需求选择合适的参数组合。\n\n## 参数说明\n\n| 参数名           | 说明                         | 是否必需 | 默认值   |\n|------------------|------------------------------|----------|----------|\n| accessKeyId      | 阿里云 AccessKeyId           | 是       | -        |\n| accessKeySecret  | 阿里云 AccessKeySecret       | 是       | -        |\n| endpoint         | 阿里云 Endpoint               | 是       | -        |\n| bucketName       | 阿里云 BucketName             | 是       | -        |\n| fromRelease      | 是否从 Release 上传           | 否       | true     |\n| repoUrl          | GitHub 仓库地址               | 否       | -        |\n| isPre            | 是否上传 PreRelease           | 否       | false    |\n| keepCount        | 保留最新几个版本              | 否       | 2        |\n| remoteDir        | 上传到远程目录                | 否       | -        |\n| addSymlink       | 是否添加软链接                | 否       | false    |\n| localPath        | 本地文件/文件夹路径           | 否       | -        |\n| region           | 阿里云 OSS 区域               | 否       | cn-shanghai |\n\n\u003e 详细参数说明请参考 action.yml 或命令行 --help。\n\n## 许可协议\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcube-studio%2Fsync2oss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxcube-studio%2Fsync2oss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxcube-studio%2Fsync2oss/lists"}