-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 981 Bytes
/
tailscale.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Sync Tailscale ACLs
on:
push:
branches: [ "master" ]
paths:
- "tailscale.policy.json"
- ".github/workflows/tailscale.yml"
pull_request:
branches: [ "master" ]
paths:
- "tailscale.policy.json"
- ".github/workflows/tailscale.yml"
jobs:
acls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy ACL
if: github.event_name == 'push'
id: deploy-acl
uses: tailscale/gitops-acl-action@v1
with:
api-key: ${{ secrets.TS_API_KEY }}
tailnet: ${{ secrets.TS_TAILNET }}
policy-file: tailscale.policy.json
action: apply
- name: Test ACL
if: github.event_name == 'pull_request'
id: test-acl
uses: tailscale/gitops-acl-action@v1
with:
api-key: ${{ secrets.TS_API_KEY }}
tailnet: ${{ secrets.TS_TAILNET }}
policy-file: tailscale.policy.json
action: test