{"id":16888771,"url":"https://github.com/zkqiang/tencent-cos-action","last_synced_at":"2025-10-10T13:43:20.355Z","repository":{"id":65155791,"uuid":"234497189","full_name":"zkqiang/tencent-cos-action","owner":"zkqiang","description":"GitHub Actions for Tencent COS Command (coscmd)","archived":false,"fork":false,"pushed_at":"2020-09-22T07:11:29.000Z","size":3,"stargazers_count":48,"open_issues_count":0,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-18T00:04:51.841Z","etag":null,"topics":["action","actions","cloud","cos","coscmd","deploy","github-action","github-actions","oss","upload","util"],"latest_commit_sha":null,"homepage":"https://cloud.tencent.com/document/product/436/10976","language":"Shell","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/zkqiang.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}},"created_at":"2020-01-17T07:42:02.000Z","updated_at":"2025-03-20T01:53:43.000Z","dependencies_parsed_at":"2023-01-12T14:45:11.607Z","dependency_job_id":null,"html_url":"https://github.com/zkqiang/tencent-cos-action","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"0745085e73dac4a24ff0830e281a3b112095107e"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zkqiang/tencent-cos-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkqiang%2Ftencent-cos-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkqiang%2Ftencent-cos-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkqiang%2Ftencent-cos-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkqiang%2Ftencent-cos-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zkqiang","download_url":"https://codeload.github.com/zkqiang/tencent-cos-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zkqiang%2Ftencent-cos-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004069,"owners_count":26083667,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["action","actions","cloud","cos","coscmd","deploy","github-action","github-actions","oss","upload","util"],"created_at":"2024-10-13T16:54:06.773Z","updated_at":"2025-10-10T13:43:20.336Z","avatar_url":"https://github.com/zkqiang.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 简介\n\n该 [GitHub Action](https://help.github.com/cn/actions) 用于调用腾讯云\n[coscmd](https://cloud.tencent.com/document/product/436/10976)\n工具，实现对象存储的批量上传、下载、删除等操作。\n\n## workflow 示例\n\n在目标仓库中创建 `.github/workflows/xxx.yml` 即可，文件名任意，配置参考如下：\n\n```yaml\nname: CI\n\non:\n  push:\n    branches:\n      - master\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Checkout master\n        uses: actions/checkout@v2\n        with:\n          ref: master\n\n      - name: Setup node\n        uses: actions/setup-node@v1\n        with:\n          node-version: \"10.x\"\n\n      - name: Build project\n        run: yarn \u0026\u0026 yarn build\n\n      - name: Upload COS\n        uses: zkqiang/tencent-cos-action@v0.1.0\n        with:\n          args: delete -r -f / \u0026\u0026 upload -r ./dist/ /\n          secret_id: ${{ secrets.SECRET_ID }}\n          secret_key: ${{ secrets.SECRET_KEY }}\n          bucket: ${{ secrets.BUCKET }}\n          region: ap-shanghai\n```\n\n其中 `${{ secrets.SECRET_XXX }}` 是调用 settings 配置的密钥，防止公开代码将权限密钥暴露，添加方式如下：\n\n![](https://static.zkqiang.cn/images/20200118171056.png-slim)\n\n## 相关参数\n\n以下参数均可参见\n[coscmd 官方文档](https://cloud.tencent.com/document/product/436/10976)\n\n| 参数 | 是否必传 | 备注 |\n| --- | --- | --- |\n| args | 是 | coscmd 命令参数，参见官方文档，多个命令用 ` \u0026\u0026 ` 隔开\u003cbr\u003e如 `delete -r -f / \u0026\u0026 upload -r ./dist/ /` |\n| secret_id | 是 | 从 [控制台-API密钥管理](https://console.cloud.tencent.com/cam/capi) 获取 |\n| secret_key | 是 | 同上 |\n| bucket | 是 | 对象存储桶的名称，包含后边的数字 |\n| region | 是 | 对象存储桶的地区，[参见文档](https://cloud.tencent.com/document/product/436/6224) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkqiang%2Ftencent-cos-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzkqiang%2Ftencent-cos-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzkqiang%2Ftencent-cos-action/lists"}