Skip to content

Commit 60d7d12

Browse files
Merge pull request #116 from depot/docs-sync-updates
2 parents 9eefbcf + 4dcb37a commit 60d7d12

File tree

2 files changed

+84
-2
lines changed

2 files changed

+84
-2
lines changed

content/container-builds/reference/github-actions.mdx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,12 @@ jobs:
292292
uses: depot/setup-action@v1
293293
294294
# Login to Google Cloud registry
295-
- uses: google-github-actions/[email protected]
295+
- uses: google-github-actions/auth@v2
296+
with:
297+
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
298+
- uses: google-github-actions/setup-gcloud@v2
296299
with:
297300
project_id: gcp-project-id
298-
service_account_key: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
299301
300302
- name: Configure docker for GCP
301303
run: gcloud auth configure-docker
@@ -309,6 +311,7 @@ jobs:
309311
context: .
310312
push: true
311313
tags: <gcp-region>-docker.pkg.dev/<gcp-project-id>/<your-app>:latest
314+
provenance: false
312315
```
313316

314317
### Build and push an image to Azure Container Registry with OIDC

content/integrations/tailscale.mdx

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Tailscale
3+
ogTitle: Tailscale
4+
description: Learn how to connect Depot to your Tailscale tailnet to enable secure access to private services.
5+
---
6+
7+
[Tailscale](https://tailscale.com/) is a zero-config VPN that connects your devices, services, and cloud networks to enable secure access to resources on any infrastructure.
8+
9+
By connecting Depot to your Tailscale network, you can enable secure access to private services, such as databases, within your tailnet without opening up those services to the public internet and without maintaining static IP allow lists.
10+
11+
Using Tailscale, Depot GitHub Actions runners and container builders join your tailnet as [ephemeral nodes](https://tailscale.com/kb/1111/ephemeral-nodes), and you can control their access to the rest of your infrastructure using Tailscale ACLs.
12+
13+
## Connecting Depot to your tailnet
14+
15+
Connecting your Depot organization to a Tailscale tailnet is a three-step process:
16+
17+
1. Configure your Tailnet ACLs to define a tag for your Depot runners
18+
2. Generate new OAuth client credentials using this new tag
19+
3. Configure your Depot organization to use those OAuth client credentials
20+
21+
### Step 1: Create a new tag in your Tailnet ACLs
22+
23+
First, you will need to create a tag that will be assigned to all Depot runners. [Tailscale tags](https://tailscale.com/kb/1068/tags) are used by Tailscale to group non-user devices, such as Depot runners, and let you manage access control policies based on these tags.
24+
25+
We recommend creating a new tag named `tag:depot-runner` for this purpose. This tag will later be used in your ACL rules to determine what Depot runners should have access to.
26+
27+
In your Tailscale [admin console](https://login.tailscale.com/admin/acls/file) access controls, [define a new tag under `tagOwners`](https://tailscale.com/kb/1337/acl-syntax#tag-owners):
28+
29+
```json
30+
{
31+
"tagOwners": {
32+
"tag:depot-runner": ["group:platform-team"]
33+
}
34+
}
35+
```
36+
37+
### Step 2: Generate a new OAuth client
38+
39+
Next, [generate a new OAuth client](https://login.tailscale.com/admin/settings/oauth) from your tailnet's settings. This client can be given a descriptive name and should be granted Write access to the `Keys > Auth Keys` scope. You should select the tag you created in the previous step as chosen tag for this scope:
40+
41+
![Generating a Tailscale OAuth client](/images/docs/integrations/tailscale-generate-oauth-client.webp)
42+
43+
You will be given a client ID and client secret that you can use in the next step.
44+
45+
### Step 3: Configure Depot to use the new OAuth client
46+
47+
Finally, you will need to configure your Depot organization to use the new OAuth client credentials. From your organization settings page, navigate to the Tailscale section and click **Connect to Tailscale**. Enter the client ID and secret from the previous step and click **Connect**:
48+
49+
![Connecting your Depot org to Tailscale](/images/docs/integrations/tailscale-connect-depot.webp)
50+
51+
Your Depot organization is now connected to your Tailscale tailnet. Depot runners and container builders will now join your tailnet as [ephemeral nodes](https://tailscale.com/kb/1111/ephemeral-nodes), using the tag you have created.
52+
53+
## Granting access to private services
54+
55+
Now that your Depot runners are connected to your tailnet, you can use Tailscale ACLs to control their access to the rest of your infrastructure. Depot runners will be [tagged](https://tailscale.com/kb/1068/tags) with your chosen tag, which you can then reference in your ACL rules.
56+
57+
For example, you can grant your Depot runners access to a private database service by creating a new [ACL rule](https://tailscale.com/kb/1337/acl-syntax#access-rules) in the [admin console](https://login.tailscale.com/admin/acls/file):
58+
59+
```json
60+
{
61+
"acls": [{"action": "accept", "src": ["tag:depot-runner"], "dst": ["database-hostname"]}]
62+
}
63+
```
64+
65+
Using [Tailscale subnet routers](https://tailscale.com/kb/1019/subnets), you can additionally grant your Depot runners access to entire subnets in any cloud provider VPC or on-premises network.
66+
67+
```json
68+
{
69+
"acls": [{"action": "accept", "src": ["tag:depot-runner"], "dst": ["192.0.2.0/24:*"]}]
70+
}
71+
```
72+
73+
## Disconnecting from Tailscale
74+
75+
If you wish to disconnect your Depot organization from Tailscale, navigate to the Tailscale section in your organization settings and click **Disconnect from Tailscale**. This will remove the OAuth client credentials from your organization and your Depot runners will no longer join your tailnet as ephemeral nodes:
76+
77+
![Tailscale management](/images/docs/integrations/tailscale-manage-connection.webp)
78+
79+
Note: disconnecting prevents new Depot runners from joining your tailnet. Any in-flight Actions jobs or container builds will remain connected until they complete. To immediately disconnect any running jobs, you can remove any of the connected nodes from your [Tailscale admin console](https://login.tailscale.com/admin/machines).

0 commit comments

Comments
 (0)