diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index ca9b6acbd8..f0d2722736 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -67,6 +67,9 @@ jobs: with: build-args: | SC_THEME=${{ matrix.tenants }} + # this is only needed when using the github registry + secrets: | + GIT_AUTH_TOKEN=${{ github.token }} context: . file: ./Dockerfile platforms: linux/amd64 diff --git a/Dockerfile b/Dockerfile index 7c7da81d10..7ea16aea12 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,15 @@ FROM docker.io/node:22 AS build-stage WORKDIR /app COPY package.json package-lock.json ./ -RUN npm ci --ignore-scripts + +# Write the .npmrc file only if the GitHub token is provided +# A token is always required to access GitHub's npm registry +RUN --mount=type=secret,id=GIT_AUTH_TOKEN \ + if [ -f /run/secrets/GIT_AUTH_TOKEN ]; then \ + echo "//npm.pkg.github.com/:_authToken=$(cat /run/secrets/GIT_AUTH_TOKEN)" > ~/.npmrc; \ + fi && \ + npm ci --ignore-scripts && \ + rm -f ~/.npmrc COPY babel.config.js eslint.config.js LICENSE.md .prettierrc.js tsconfig.json tsconfig.build.json .prettierignore ./ COPY lib/eslint-plugin-schulcloud ./lib/eslint-plugin-schulcloud diff --git a/package-lock.json b/package-lock.json index 3496ccc602..8382a91253 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "dependencies": { "@braintree/sanitize-url": "^7.1.1", "@ckeditor/ckeditor5-vue": "^5.1.0", - "@hpi-schul-cloud/ckeditor": "^1.2.0", + "@hpi-schul-cloud/ckeditor": "^0.0.1-4c867f8376b47589cb9696054927d8ba2bec1e21", "@lumieducation/h5p-webcomponents": "^9.2.2", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4", @@ -2023,7 +2023,9 @@ "license": "MIT" }, "node_modules/@hpi-schul-cloud/ckeditor": { - "version": "1.2.0", + "version": "0.0.1-4c867f8376b47589cb9696054927d8ba2bec1e21", + "resolved": "https://npm.pkg.github.com/download/@hpi-schul-cloud/ckeditor/0.0.1-4c867f8376b47589cb9696054927d8ba2bec1e21/b8bc1b765ae9d29931927ae844bbe236de711e5e", + "integrity": "sha512-q/DiehCQ/Ly4bIj2ei0WjMUja8F1yK1n7wmNBBoueXIENOncSoHtpPNJwjABpxVsKxYCMrzWL4VWDromfGFt5w==", "license": "AGPL-3.0", "engines": { "node": ">=20", diff --git a/package.json b/package.json index 07fe9c6577..fb94b62129 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "dependencies": { "@braintree/sanitize-url": "^7.1.1", "@ckeditor/ckeditor5-vue": "^5.1.0", - "@hpi-schul-cloud/ckeditor": "^1.2.0", + "@hpi-schul-cloud/ckeditor": "^0.0.1-4c867f8376b47589cb9696054927d8ba2bec1e21", "@lumieducation/h5p-webcomponents": "^9.2.2", "@vuelidate/core": "^2.0.3", "@vuelidate/validators": "^2.0.4",