{"id":21877109,"url":"https://github.com/x-actions/go-sync","last_synced_at":"2025-04-15T02:43:01.054Z","repository":{"id":38027490,"uuid":"236452773","full_name":"x-actions/go-sync","owner":"x-actions","description":"a tools sync code to cdn, like aliyun oss.","archived":false,"fork":false,"pushed_at":"2022-06-11T11:29:52.000Z","size":285,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-03-15T10:22:08.223Z","etag":null,"topics":["actions","aliyun","cdn","github","githubactions","oss"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/x-actions.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-27T09:07:12.000Z","updated_at":"2022-08-25T08:38:48.000Z","dependencies_parsed_at":"2023-01-05T05:03:00.241Z","dependency_job_id":null,"html_url":"https://github.com/x-actions/go-sync","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.15384615384615385","last_synced_commit":"d5c53edf0cdf1d94761f558975e2bf6bc624cccb"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-actions%2Fgo-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-actions%2Fgo-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-actions%2Fgo-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/x-actions%2Fgo-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/x-actions","download_url":"https://codeload.github.com/x-actions/go-sync/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248997050,"owners_count":21195785,"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":["actions","aliyun","cdn","github","githubactions","oss"],"created_at":"2024-11-28T08:08:08.601Z","updated_at":"2025-04-15T02:43:01.034Z","avatar_url":"https://github.com/x-actions.png","language":"Go","readme":"# Github Action for Sync Code to CDN\n\n[![build-test](https://github.com/x-actions/go-sync/actions/workflows/workflow.yaml/badge.svg)](https://github.com/x-actions/go-sync/actions/workflows/workflow.yaml)\n[![GoDoc](https://godoc.org/github.com/x-actions/go-sync?status.svg)](https://pkg.go.dev/github.com/x-actions/go-sync)\n[![Go Report Card](https://goreportcard.com/badge/github.com/x-actions/go-sync)](https://goreportcard.com/report/github.com/x-actions/go-sync)\n\na tools sync code to cdn, like aliyun oss.\n\n## Environment Variables\n\n- ACCESSKEYID: CDN Access Key ID\n- ACCESSKEYSECRET: CDN Access Key Secret\n\n## Usage\n\n### Use as Github Action\n\n- Sample Use\n\n```\n    - name: Sync Code to CDN\n      uses: x-actions/go-sync@main\n      with:\n        provider: \"aliyun\"\n        access_key: ${{ secrets.ACCESSKEYID }}\n        access_secret: ${{ secrets.ACCESSKEYSECRET }}\n        endpoint: \"\u003cENDPOINT\u003e\"\n        bucket: \"\u003cBUCKETNAME\u003e\"\n        source: \"/github/workspace/public\"\n```\n\n- Advance Use\n\n```\n    - name: Sync Code to CDN\n      uses: x-actions/go-sync@main\n      with:\n        provider: \"aliyun\"\n        access_key: ${{ secrets.ACCESSKEYID }}\n        access_secret: ${{ secrets.ACCESSKEYSECRET }}\n        endpoint: \"\u003cENDPOINT\u003e\"\n        bucket: \"\u003cBUCKETNAME\u003e\"\n        cache: \"\u003csome-path/\u003cBUCKETNAME\u003e.json\u003e\"\n        exclude: \"str1,str2\"  # .git,.DS_Store\n        source: \"/github/workspace/public\"\n        ignore_expr: \"\"  # \"\u003cli\u003eBuild \u003csmall\u003e\u0026copy; .*\u003c/small\u003e\u003c/li\u003e\"\n        delete_objects: true\n        exclude_delete_objects: \"\u003crelative-of-source-path\u003e,\u003crelative-of-source-file\u003e\"\n```\n\n### Usage as command line\n\n- download\n\n```\ncurl -Lfs -o main https://github.com/x-actions/go-sync/releases/latest/download/gsync-{linux|darwin|windows}\nchmod +x gsync\n./gsync -h\n```\n\n- or build\n\n```\ngit clone https://github.com/x-actions/go-sync.git\nmake all\n```\n\n- usage\n\n```\n./gsync \\\n  -provider \"aliyun\" \\\n  -access-key ${ALICLOUD_ACCESS_KEY} \\\n  -access-secret ${ALICLOUD_SECRET_KEY} \\\n  -bucket \"dev-blog-xiexianbin-cn\" \\\n  -endpoint \"oss-cn-hangzhou.aliyuncs.com\" \\\n  -source \"/Users/xiexianbin/workspace/code/github.com/xiexianbin/note/public\" \\\n  -exclude \".git,.DS_Store\" \\\n  -ignore-expr \"\u003cli\u003eBuild \u003csmall\u003e\u0026copy; .*\u003c/small\u003e\u003c/li\u003e\" \\\n  -delete-objects=true \\\n  -exclude-delete-objects \"images/ads/aliyun.png,images/xiexianbin.png\"\n```\n\n## Others\n\n- fork from https://github.com/xiexianbin/webhooks\n- ref for https://github.com/xiexianbin/gsync\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-actions%2Fgo-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fx-actions%2Fgo-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fx-actions%2Fgo-sync/lists"}