Skip to content

Commit bcf4fc9

Browse files
committed
add Dockerfile and push to Github Packages
1 parent 5e302ff commit bcf4fc9

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

.github/workflows/go.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,20 @@ jobs:
2929

3030
- name: Go Test
3131
run: make test
32+
33+
push:
34+
name: Push Docker image to Github Packages
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
40+
- name: Build and push Docker images
41+
uses: docker/[email protected]
42+
with:
43+
username: nebell
44+
password: ${{ secrets.GITHUB_TOKEN }}
45+
registry: docker.pkg.github.com
46+
repository: nebell/ga4summer2020/dingdongbot
47+
tag_with_ref: true
48+
# tags: latest

.github/workflows/testonwin.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,7 @@ jobs:
7979

8080
# Runs a single command using the runners shell
8181
- name: Build Dingdongbot
82-
run: make install
82+
run: |
83+
go vet ./...
84+
make install
85+
make test

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM golang
2+
COPY . go_wechaty_examples
3+
ENV GOPROXY https://goproxy.io,direct
4+
RUN cd go_wechaty_examples && make test
5+
ENTRYPOINT ./go_wechaty_examples/ding-dong-bot

0 commit comments

Comments
 (0)