This repository was archived by the owner on Aug 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +49
-8
lines changed
Expand file tree Collapse file tree 6 files changed +49
-8
lines changed Original file line number Diff line number Diff line change 55 - created
66env :
77 GH_TOKEN : " ${{ secrets.GH_PAT }}"
8+ GH_REBOT_VERSION : " v0.0.5"
89jobs :
910 comment :
1011 if : startswith(github.event.comment.body, '/')
1112 runs-on : ubuntu-latest
1213 steps :
1314 - name : Checkout the latest code
1415 uses : actions/checkout@v3
15- - name : Using gh-rebot
16- uses : labring/gh-rebot@v0.0.6-rc1
17- env :
18- SEALOS_TYPE : " /comment"
16+ - name : Download gh-rebot
17+ run : |
18+ sudo wget -q https://github.com/labring/gh-rebot/releases/download/${GH_REBOT_VERSION}/gh-rebot_${GH_REBOT_VERSION#v}_linux_amd64.tar.gz
19+ sudo tar -zxf gh-rebot_${GH_REBOT_VERSION#v}_linux_amd64.tar.gz gh-rebot && chmod +x gh-rebot && sudo mv gh-rebot /usr/bin/gh-rebot
20+ gh-rebot version
21+ - name : Using sealos-rebot
22+ run : |
23+ gh-rebot comment
Original file line number Diff line number Diff line change 1+ name : Github Rebot for Sealos test comment
2+ on :
3+ issue_comment :
4+ types :
5+ - created
6+ env :
7+ GH_TOKEN : " ${{ secrets.GH_PAT }}"
8+ jobs :
9+ if : startswith(github.event.comment.body, '/')
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout the latest code
13+ uses : actions/checkout@v3
14+ - uses : labring/gh-rebot@v0.0.6-rc2
15+ if : ${{ (github.event_name != 'push') }}
16+ env :
17+ SEALOS_TYPE : " /comment"
Original file line number Diff line number Diff line change 1- name : Github Rebot for Sealos PR
1+ name : Github Rebot for Sealos test PR
22
33on :
44 - push
99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v3
12- - uses : labring/gh-rebot@v0.0.6-rc1
12+ - uses : labring/gh-rebot@v0.0.6-rc2
1313 if : ${{ (github.event_name != 'push') }}
1414 env :
1515 SEALOS_TYPE : " pr_comment"
Original file line number Diff line number Diff line change 1+ FROM golang:1.20-alpine AS builder
2+ WORKDIR /app
3+
4+ COPY go.mod go.sum ./
5+ COPY . .
6+
7+ RUN go mod download
8+
9+ RUN CGO_ENABLED=0 GOOS=linux go build -a -o gh-rebot .
10+
11+ FROM alpine:3.16.2
12+
13+ COPY --from=builder /app/gh-rebot /app/
14+ MAINTAINER "Sealos Inc."
15+ RUN apk --no-cache add jq bash curl git git-lfs github-cli
16+ ENTRYPOINT ["/app/gh-rebot","action"]
Original file line number Diff line number Diff line change @@ -8,4 +8,7 @@ RUN apk --no-cache add jq bash curl git git-lfs github-cli
88
99COPY gh-rebot /usr/bin/
1010
11- ENTRYPOINT ["/usr/bin/gh-rebot" ,"action" ]
11+
12+ ENTRYPOINT ["/usr/bin/gh-rebot" ]
13+
14+ CMD ["--help" ]
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ description: "Add some rebot command for sealos"
33author : " cuisongliu"
44runs :
55 using : ' docker'
6- image : ' Dockerfile '
6+ image : ' ActionDockerfile '
77branding :
88 icon : ' git-pull-request'
99 color : ' green'
You can’t perform that action at this time.
0 commit comments