{"id":16191875,"url":"https://github.com/animmouse/setup-cloudflared","last_synced_at":"2025-03-19T03:31:03.462Z","repository":{"id":65157421,"uuid":"432494184","full_name":"AnimMouse/setup-cloudflared","owner":"AnimMouse","description":"Setup/Install Cloudflare Tunnel client for GitHub Actions ","archived":false,"fork":false,"pushed_at":"2024-10-08T16:52:28.000Z","size":34,"stargazers_count":33,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-12T10:47:16.181Z","etag":null,"topics":["action","actions","actionshackathon21","cloudflare","cloudflare-tunnel","cloudflared","github-actions","proxy","reverse-proxy","tunnel"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/setup-cloudflared","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AnimMouse.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":"2021-11-27T15:16:19.000Z","updated_at":"2025-03-01T20:35:39.000Z","dependencies_parsed_at":"2024-10-30T08:45:25.574Z","dependency_job_id":null,"html_url":"https://github.com/AnimMouse/setup-cloudflared","commit_stats":{"total_commits":26,"total_committers":1,"mean_commits":26.0,"dds":0.0,"last_synced_commit":"b80ad7aa7850e1ec9960d75831f32ac9855df988"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Fsetup-cloudflared","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Fsetup-cloudflared/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Fsetup-cloudflared/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AnimMouse%2Fsetup-cloudflared/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AnimMouse","download_url":"https://codeload.github.com/AnimMouse/setup-cloudflared/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244350985,"owners_count":20439291,"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":["action","actions","actionshackathon21","cloudflare","cloudflare-tunnel","cloudflared","github-actions","proxy","reverse-proxy","tunnel"],"created_at":"2024-10-10T08:06:58.149Z","updated_at":"2025-03-19T03:31:03.137Z","avatar_url":"https://github.com/AnimMouse.png","language":"PowerShell","readme":"# Setup cloudflared for GitHub Actions\nSetup [Cloudflare Tunnel client](https://github.com/cloudflare/cloudflared) for GitHub Actions.\n\nThis action installs [cloudflared](https://github.com/cloudflare/cloudflared) for use in actions by installing it on tool cache using [AnimMouse/tool-cache](https://github.com/AnimMouse/tool-cache).\n\nThis GitHub action participated in the [GitHub Actions Hackathon 2021](https://dev.to/animmouse/expose-your-web-server-on-github-actions-to-the-internet-using-cloudflare-tunnel-ego), but sadly, it lost.\n\nTest page for setup-cloudflared: https://setup-cloudflared.44444444.xyz (This will only work when the test action is running.)\n\n## Usage\nTo use `cloudflared`, run this action before `cloudflared`.\n\n```yaml\nsteps:\n  - name: Setup cloudflared\n    uses: AnimMouse/setup-cloudflared@v2\n    \n  - name: Check cloudflared version\n    run: cloudflared -v\n```\n\n### Cloudflare Tunnel Usage\nUse Cloudflare Tunnel to expose servers running inside GitHub Actions to the Internet.\n\n1. Encode the JSON credential in Base64 using this command `base64 -w 0 \u003ccloudflare-tunnel-id\u003e.json` and paste it to `CLOUDFLARE_TUNNEL_CREDENTIAL` secret.\n2. Inside the config.yaml, set `credentials-file:` to:\n   1. Ubuntu: `/home/runner/.cloudflared/\u003ccloudflare-tunnel-id\u003e.json`\n   2. Windows: `C:\\Users\\runneradmin\\.cloudflared\\\u003ccloudflare-tunnel-id\u003e.json`\n   3. macOS: `/Users/runner/.cloudflared/\u003ccloudflare-tunnel-id\u003e.json`\n3. Encode the config.yaml in Base64 using this command `base64 -w 0 config.yaml` and paste it to `CLOUDFLARE_TUNNEL_CONFIGURATION` variable.\n4. Add the Cloudflare Tunnel ID to `CLOUDFLARE_TUNNEL_ID` variable.\n\nTo gracefully shutdown Cloudflare Tunnel after being started in the background, use the `AnimMouse/setup-cloudflared/shutdown` action as composite actions does not support `post:` yet.\\\nThe `Shutdown Cloudflare Tunnel` action should have `if: '! cancelled()'` so that it will run even if the workflow fails.\n\n```yaml\nsteps:\n  - name: Setup cloudflared\n    uses: AnimMouse/setup-cloudflared@v2\n    \n  - name: Setup cloudflared tunnel\n    uses: AnimMouse/setup-cloudflared/tunnel@v2\n    with:\n      cloudflare_tunnel_credential: ${{ secrets.CLOUDFLARE_TUNNEL_CREDENTIAL }}\n      cloudflare_tunnel_configuration: ${{ vars.CLOUDFLARE_TUNNEL_CONFIGURATION }}\n      cloudflare_tunnel_id: ${{ vars.CLOUDFLARE_TUNNEL_ID }}\n      \n  - name: Start Python HTTP server\n    run: timeout 5m python -m http.server 8080 || true\n    \n  - name: Shutdown and view logs of cloudflared\n    if: '! cancelled()'\n    uses: AnimMouse/setup-cloudflared/shutdown@v2\n```\n\nIf you don't want to automatically start Cloudflare Tunnel in the background, set `autostart:` to `false`.\n\n```yaml\nsteps:\n  - name: Setup cloudflared\n    uses: AnimMouse/setup-cloudflared@v2\n    \n  - name: Setup cloudflared tunnel\n    uses: AnimMouse/setup-cloudflared/tunnel@v2\n    with:\n      cloudflare_tunnel_credential: ${{ secrets.CLOUDFLARE_TUNNEL_CREDENTIAL }}\n      cloudflare_tunnel_configuration: ${{ vars.CLOUDFLARE_TUNNEL_CONFIGURATION }}\n      cloudflare_tunnel_id: ${{ vars.CLOUDFLARE_TUNNEL_ID }}\n      autostart: false\n      \n  - name: Manually start cloudflared tunnel\n    run: timeout 5m cloudflared tunnel run || true\n```\n\n### TryCloudflare Usage\nYou can use Cloudflare Tunnel without a Cloudflare account and a domain name. Your quick tunnel URL will appear on the Actions log.\n\n```yaml\nsteps:\n  - name: Setup cloudflared\n    uses: AnimMouse/setup-cloudflared@v2\n    \n  - name: Setup cloudflared tunnel\n    uses: AnimMouse/setup-cloudflared/tunnel@v2\n    with:\n      url: http://localhost:8080\n      \n  - name: Start Python HTTP server\n    run: timeout 5m python -m http.server 8080 || true\n    \n  - name: Shutdown and view logs of cloudflared\n    if: '! cancelled()'\n    uses: AnimMouse/setup-cloudflared/shutdown@v2\n```\n\n### Specific version\nYou can specify the version you want. By default, this action downloads the latest version if the version is not specified.\n\n```yaml\nsteps:\n  - name: Setup cloudflared\n    uses: AnimMouse/setup-cloudflared@v2\n    with:\n      version: 2024.2.1\n```\n\n### GitHub token\nThis action automatically uses a GitHub token in order to authenticate with the GitHub API and avoid rate limiting. You can also specify your own read-only fine-grained personal access token.\n\n```yaml\nsteps:\n  - name: Setup cloudflared\n    uses: AnimMouse/setup-cloudflared@v2\n    with:\n      token: ${{ secrets.GH_PAT }}\n```\n\n### Example config.yaml file\nUbuntu:\n```yaml\nurl: http://localhost:8080\ntunnel: deadbeef-1234-4321-abcd-123456789abc\ncredentials-file: /home/runner/.cloudflared/deadbeef-1234-4321-abcd-123456789abc.json\n```\n\nWindows:\n```yaml\nurl: http://localhost:8080\ntunnel: deadbeef-1234-4321-abcd-123456789abc\ncredentials-file: C:\\Users\\runneradmin\\.cloudflared\\deadbeef-1234-4321-abcd-123456789abc.json\n```\n\nmacOS:\n```yaml\nurl: http://localhost:8080\ntunnel: deadbeef-1234-4321-abcd-123456789abc\ncredentials-file: /Users/runner/.cloudflared/deadbeef-1234-4321-abcd-123456789abc.json\n```\n\n### Similar actions\n1. [vmactions/cf-tunnel](https://github.com/vmactions/cf-tunnel)\n2. [apogiatzis/ngrok-tunneling-action](https://github.com/apogiatzis/ngrok-tunneling-action)\n3. [vmactions/ngrok-tunnel](https://github.com/vmactions/ngrok-tunnel)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimmouse%2Fsetup-cloudflared","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanimmouse%2Fsetup-cloudflared","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimmouse%2Fsetup-cloudflared/lists"}