File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- dev
7
+ - CI
7
8
pull_request :
8
9
branches :
9
10
- main
19
20
image : ghcr.io/socoldkiller/headscale-build:dev
20
21
credentials :
21
22
username : ${{ github.actor }}
22
- password : ${{secrets.TOKEN }}
23
+ password : ${{secrets.GITHUB_TOKEN }}
23
24
steps :
24
25
- uses : actions/checkout@v4
25
26
@@ -36,15 +37,18 @@ jobs:
36
37
- name : Build binary
37
38
run : |
38
39
go build -ldflags="-s -w" -o headscale ./cmd/headscale
40
+
41
+ - name : Login to GHCR
42
+ uses : docker/login-action@v3
43
+ with :
44
+ registry : ghcr.io
45
+ username : ${{ github.repository_owner }}
46
+ password : ${{ secrets.GITHUB_TOKEN }}
39
47
40
48
- name : build docker image
41
- env :
42
- GITHUB_TOKEN : ${{ secrets.TOKEN }}
43
49
run : |
44
50
echo "FROM alpine:latest" > Dockerfile
45
51
echo "COPY headscale /usr/local/bin/headscale" >> Dockerfile
46
- echo "ENTRYPOINT [\"headscale\", \"serve\"]" >> Dockerfile
47
-
52
+ echo "ENTRYPOINT [\"headscale\", \"serve\"]" >> Dockerfile
48
53
docker build -t ghcr.io/${{ github.repository }}:dev .
49
- echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
50
54
docker push ghcr.io/${{ github.repository }}:dev
You can’t perform that action at this time.
0 commit comments