Skip to content

Commit

Permalink
Pass in github token
Browse files Browse the repository at this point in the history
  • Loading branch information
vmilosevic committed Aug 19, 2024
1 parent ac4fa60 commit 2e2c4b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ENV DEBIAN_FRONTEND=noninteractive
ENV TTMLIR_TOOLCHAIN_DIR=/opt/ttmlir-toolchain
ENV TTFORGE_TOOLCHAIN_DIR=/opt/ttforge-toolchain
ENV PROJECT_NAME=tt-forge
ARG GITHUB_TOKEN

# Install dependencies
RUN apt-get update && apt-get install -y \
Expand Down Expand Up @@ -58,7 +57,7 @@ RUN mkdir -p $BUILD_DIR && \

# Clone the project and update submodules
# Pass in PAT to clone private repositories
RUN git clone https://$GITHUB_TOKEN@github.com/tenstorrent/tt-forge.git $BUILD_DIR/$PROJECT_NAME && \
RUN git clone https://github.com/tenstorrent/tt-forge.git $BUILD_DIR/$PROJECT_NAME && \
cd $BUILD_DIR/$PROJECT_NAME && \
git submodule update --init --recursive -f

Expand All @@ -75,5 +74,4 @@ RUN source env/activate && \

# Clean up the build directory
RUN cd .. && \
rm -rf $BUILD_DIR/$PROJECT_NAME && \
unset GITHUB_TOKEN
rm -rf $BUILD_DIR/$PROJECT_NAME
6 changes: 3 additions & 3 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
with:
context: .github
file: .github/Dockerfile
push: true
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
push: true
secrets: |
GIT_AUTH_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: |
ghcr.io/${{ github.repository }}/tt-forge-ubuntu-22-04:${{ github.sha }}
ghcr.io/${{ github.repository }}/tt-forge-ubuntu-22-04:latest
Expand Down

0 comments on commit 2e2c4b9

Please sign in to comment.