From 2ae2a63c4852d092e724f9f9d1ab31fa3be4addc Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Tue, 20 Aug 2024 13:21:56 -0400 Subject: [PATCH 1/2] Fix GitHub token missing in Docker build Signed-off-by: Timothy Johnson --- .github/workflows/docker-reusable.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-reusable.yaml b/.github/workflows/docker-reusable.yaml index 4934480..122a8ae 100644 --- a/.github/workflows/docker-reusable.yaml +++ b/.github/workflows/docker-reusable.yaml @@ -72,12 +72,12 @@ jobs: id: build uses: docker/build-push-action@v5 with: - build-args: | - GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} - ${{ inputs.build-args }} + build-args: ${{ inputs.build-args }} context: ${{ inputs.path }} push: ${{ inputs.push }} platforms: ${{ inputs.qemu && 'linux/amd64,linux/arm64' || 'linux/amd64' }} + secret-envs: | + GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} tags: ${{ inputs.tags || env.DEFAULT_TAGS }} - name: Image Digest From 21abb2ff28e28da450f4ee2182d82595384b9f57 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Tue, 20 Aug 2024 14:37:36 -0400 Subject: [PATCH 2/2] Try to build Theia without GitHub token Signed-off-by: Timothy Johnson --- .github/workflows/docker-reusable.yaml | 3 +-- ze/theia-slim/Dockerfile | 3 +-- ze/theia-slim/README.md | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-reusable.yaml b/.github/workflows/docker-reusable.yaml index 122a8ae..1d27fd4 100644 --- a/.github/workflows/docker-reusable.yaml +++ b/.github/workflows/docker-reusable.yaml @@ -76,8 +76,7 @@ jobs: context: ${{ inputs.path }} push: ${{ inputs.push }} platforms: ${{ inputs.qemu && 'linux/amd64,linux/arm64' || 'linux/amd64' }} - secret-envs: | - GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} + secrets: github_token=${{ secrets.GITHUB_TOKEN }} tags: ${{ inputs.tags || env.DEFAULT_TAGS }} - name: Image Digest diff --git a/ze/theia-slim/Dockerfile b/ze/theia-slim/Dockerfile index 7d1233e..50d6fa2 100644 --- a/ze/theia-slim/Dockerfile +++ b/ze/theia-slim/Dockerfile @@ -13,11 +13,10 @@ WORKDIR /home/theia ADD buildPackageJson.js ./buildPackageJson.js ARG THEIA_VERSION=latest RUN echo "$(node buildPackageJson.js ${THEIA_VERSION})" > package.json -ARG GITHUB_TOKEN RUN yarn global add node-gyp && \ yarn --pure-lockfile && \ NODE_OPTIONS="--max_old_space_size=4096" yarn theia build && \ - yarn theia download:plugins && \ + yarn theia download:plugins --rate-limit=15 --parallel=false && \ yarn --production && \ yarn autoclean --init && \ echo *.ts >> .yarnclean && \ diff --git a/ze/theia-slim/README.md b/ze/theia-slim/README.md index 8a647d7..eed5382 100644 --- a/ze/theia-slim/README.md +++ b/ze/theia-slim/README.md @@ -6,8 +6,6 @@ Based on https://github.com/theia-ide/theia-apps/tree/master/theia-docker To build the container, run `docker build .` -**Note:** You may need to provide a GITHUB_TOKEN as a build argument with `repo` access - The following runs Theia IDE on http://localhost:3000 with the current directory as a workspace. The option of `--init` is added to fix the [defunct process problem](https://github.com/theia-ide/theia-apps/issues/195). ```bash