You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67-35
Original file line number
Diff line number
Diff line change
@@ -3,82 +3,115 @@ Setup [Cloudflare Tunnel client](https://github.com/cloudflare/cloudflared) for
3
3
4
4
This 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).
5
5
6
-
This action will automatically sign in and start Cloudflare Tunnel.
7
-
8
-
This GitHub action participated on [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.
6
+
This 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.
9
7
10
8
Test page for setup-cloudflared: https://setup-cloudflared.44444444.xyz (This will only work when the test action is running.)
11
9
12
10
## Usage
11
+
To use `cloudflared`, run this action before `cloudflared`.
12
+
13
+
```yaml
14
+
steps:
15
+
- name: Setup cloudflared
16
+
uses: AnimMouse/setup-cloudflared@v2
17
+
18
+
- name: Check cloudflared version
19
+
run: cloudflared -v
20
+
```
21
+
22
+
### Cloudflare Tunnel Usage
23
+
Use Cloudflare Tunnel to expose servers running inside GitHub Actions to the Internet.
24
+
13
25
1. Encode the JSON credential in Base64 using this command `base64 -w 0 <cloudflare-tunnel-id>.json` and paste it to `CLOUDFLARE_TUNNEL_CREDENTIAL` secret.
14
-
2.At the config.yaml, set `credentials-file:` to:
26
+
2. Inside the config.yaml, set `credentials-file:` to:
3. Encode the config.yaml in Base64 using this command `base64 -w 0 config.yaml` and paste it to `CLOUDFLARE_TUNNEL_CONFIGURATION`secret.
19
-
4. Add the Cloudflare Tunnel ID to `CLOUDFLARE_TUNNEL_ID`secret.
30
+
3. Encode the config.yaml in Base64 using this command `base64 -w 0 config.yaml` and paste it to `CLOUDFLARE_TUNNEL_CONFIGURATION` variable.
31
+
4. Add the Cloudflare Tunnel ID to `CLOUDFLARE_TUNNEL_ID` variable.
20
32
21
33
To 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.\
22
-
The `Shutdown Cloudflare Tunnel` action should have `if: always()` so that it will run even if the workflow failed or canceled.
34
+
The `Shutdown Cloudflare Tunnel` action should have `if: '! cancelled()'` so that it will run even if the workflow fails.
This action automatically uses a GitHub token in order to authenticate with GitHub API and avoid rate limiting. You can also specify your own read-only fine-grained personal access token.
108
+
This 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.
0 commit comments