There was an error while loading. Please reload this page.
1 parent ea79b55 commit c922666Copy full SHA for c922666
1 file changed
.github/workflows/docker-build.yml
@@ -0,0 +1,34 @@
1
+name: Deploy custom tailscale image to GHCR
2
+
3
+on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
9
+permissions:
10
+ contents: read
11
+ packages: write
12
13
+jobs:
14
+ build-and-push:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - name: Checkout repo
18
+ uses: actions/checkout@v4
19
+ with:
20
+ token: ${{ secrets.REPO_KEY }}
21
+ ref: main
22
23
+ - name: Login to GHCR
24
+ uses: docker/login-action@v2
25
26
+ registry: ghcr.io
27
+ username: ${{ github.actor }}
28
+ password: ${{ secrets.REPO_KEY }}
29
30
+ - name: Build and push Docker image
31
+ run: |
32
+ OWNER_NAME=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
33
+ docker build . -t ghcr.io/$OWNER_NAME/tailscale:latest
34
+ docker push ghcr.io/$OWNER_NAME/tailscale:latest
0 commit comments