Skip to content
This repository was archived by the owner on Aug 26, 2023. It is now read-only.

Commit 7e2f6c3

Browse files
authored
feature(main): fix error for action test bot (#16)
Signed-off-by: cuisongliu <cuisongliu@qq.com>
1 parent 5273064 commit 7e2f6c3

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

.github/workflows/test-bot.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ on:
33
issue_comment:
44
types:
55
- created
6-
env:
7-
GH_TOKEN: "${{ secrets.GH_PAT }}"
86
jobs:
97
comment:
108
if: startswith(github.event.comment.body, '/')
@@ -16,3 +14,4 @@ jobs:
1614
if: ${{ (github.event_name != 'push') }}
1715
env:
1816
SEALOS_TYPE: "/comment"
17+
GH_TOKEN: "${{ secrets.GH_PAT }}"

.github/workflows/test-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ jobs:
1515
SEALOS_TYPE: "pr_comment"
1616
SEALOS_FILENAME: "templates/template.md"
1717
REPLACE_TAG: "DEFAULT"
18+
GH_TOKEN: "${{ secrets.GH_PAT }}"

ActionDockerfile

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
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-
111
FROM alpine:3.16.2
12-
2+
ENV GH_REBOT_VERSION=v0.0.6-rc3
133
COPY --from=builder /app/gh-rebot /app/
144
MAINTAINER "Sealos Inc."
155
RUN apk --no-cache add jq bash curl git git-lfs github-cli
16-
ENTRYPOINT ["/app/gh-rebot","action"]
6+
RUN wget -q https://github.com/labring/gh-rebot/releases/download/${GH_REBOT_VERSION}/gh-rebot_${GH_REBOT_VERSION#v}_linux_amd64.tar.gz && \
7+
tar -zxf gh-rebot_${GH_REBOT_VERSION#v}_linux_amd64.tar.gz gh-rebot && chmod +x gh-rebot && mv gh-rebot /usr/bin/gh-rebot && \
8+
gh-rebot version
9+
ENTRYPOINT ["gh-rebot","action"]

0 commit comments

Comments
 (0)