Skip to content

Commit f3493c2

Browse files
committed
chore(Dockerfile): streamline repo cloning with GitHub CLI
1 parent ca938f3 commit f3493c2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,14 @@ COPY .git /source/.git
4444
# Clone from local source into working directory
4545
WORKDIR /app
4646

47-
RUN git clone --branch main /source /app --local
48-
RUN git remote set-url origin https://github.com/oleander/git-ai.git
49-
RUN git pull origin main
47+
ARG GH_TOKEN
48+
ENV GH_TOKEN=$GH_TOKEN
49+
RUN gh repo clone oleander/git-ai /app
5050
RUN cargo fetch
5151
RUN cargo build
5252
RUN cargo clippy
5353

5454
ARG PR_NUMBER
55-
ARG GH_TOKEN
56-
ENV GH_TOKEN=$GH_TOKEN
5755
RUN gh pr checkout $PR_NUMBER
5856
RUN cargo fetch
5957
RUN cargo build

0 commit comments

Comments
 (0)