File tree Expand file tree Collapse file tree 4 files changed +97
-0
lines changed Expand file tree Collapse file tree 4 files changed +97
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : Update Dependencies
3
+
4
+ on :
5
+ push :
6
+ branches : [ master ]
7
+ repository_dispatch :
8
+ types : [ updatedeps ]
9
+
10
+ jobs :
11
+ UpdateDep :
12
+ name : Update Dependency
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v2
17
+
18
+ - name : Setup Go environment
19
+
20
+ with :
21
+ go-version : 1.14.4 # optional
22
+ - name : Update Dependency
23
+ run : go get -u ./...
24
+
25
+ - name : Test
26
+ run : |
27
+ make install
28
+ make test
29
+
30
+ - name : Create Pull Request
31
+ uses : peter-evans/create-pull-request@v2
32
+ with :
33
+ token : ${{ secrets.GITHUB_TOKEN }}
34
+ commit-message : Update dependencies
35
+ title : Update dependencies
36
+ body : |
37
+ - Dependency updates
38
+
39
+ Auto-generated by [create-pull-request][1]
40
+
41
+ [1]: https://github.com/peter-evans/create-pull-request
42
+ branch : update-dependencies
Original file line number Diff line number Diff line change 29
29
30
30
- name : Go Test
31
31
run : make test
32
+
33
+ push :
34
+ name : Push Docker image to Github Packages
35
+ runs-on : ubuntu-latest
36
+ needs : build
37
+ if : github.event_name != 'pull_request'
38
+ steps :
39
+ - name : Checkout
40
+ uses : actions/checkout@v2
41
+
42
+ - name : Build and push Docker images
43
+
44
+ with :
45
+ username : ${{ github.actor }}
46
+ password : ${{ secrets.GITHUB_TOKEN }}
47
+ registry : docker.pkg.github.com
48
+ repository : wechaty/go-wechaty-getting-started/dingdongbot
49
+ tag_with_ref : true
Original file line number Diff line number Diff line change
1
+ name : Test on Windows
2
+
3
+ on :
4
+ push :
5
+ branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
8
+
9
+ jobs :
10
+ Build :
11
+ name : Build on Windows
12
+ runs-on : windows-latest
13
+
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v2
17
+
18
+ - name : Setup Go environment
19
+
20
+ with :
21
+ go-version : 1.14.4 # optional
22
+
23
+ - name : Build Dingdongbot
24
+ run : |
25
+ go vet ./...
26
+ make install
27
+ make test
Original file line number Diff line number Diff line change
1
+ FROM golang AS builder
2
+ WORKDIR /root/
3
+ COPY . src
4
+ ENV GOPROXY https://goproxy.io,direct
5
+ RUN cd src && CGO_ENABLED=0 GOOS=linux go build -o ding-dong-bot -v ./examples/ding-dong-bot.go
6
+
7
+ FROM alpine AS prod
8
+ WORKDIR /root/
9
+ COPY --from=builder /root/src/ding-dong-bot .
10
+ ENTRYPOINT ["./ding-dong-bot" ]
You can’t perform that action at this time.
0 commit comments