From 45472902cdbfee66f9e6dbf96e90a2d97206edab Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Mon, 29 Apr 2024 17:22:31 +0200 Subject: [PATCH 1/5] Update action versions. --- .github/workflows/deploy_docs.yml | 3 ++- .github/workflows/deploy_images.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index f98bfe0..3618b8e 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -11,8 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: + submodules: recursive persist-credentials: false - name: Pull docker image 🐳 diff --git a/.github/workflows/deploy_images.yml b/.github/workflows/deploy_images.yml index de091dd..89bed95 100644 --- a/.github/workflows/deploy_images.yml +++ b/.github/workflows/deploy_images.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false From ca0853f2cd2d4b98904c488f8e890bc87d6934e6 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Mon, 29 Apr 2024 17:28:42 +0200 Subject: [PATCH 2/5] Add GH action tweak. --- docker/run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/run.sh b/docker/run.sh index 0f75056..5a5c4d0 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -31,6 +31,11 @@ action() { return "1" fi + # when in a github action runner, declare the mounted repo safe + if [ ! -z "%{GITHUB_ACTIONS}" ]; then + docker_cmd="git config --global --add safe.directory /documentation; ${docker_cmd}" + fi + # start the container local cmd="docker run ${docker_args} cmsml/documentation ${docker_cmd}" echo -e "command: ${cmd}\n" From 35f930afc283aadfc90b18f53d8485ba530814a3 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Mon, 29 Apr 2024 17:32:43 +0200 Subject: [PATCH 3/5] Quote fix. --- docker/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/run.sh b/docker/run.sh index 5a5c4d0..75131e1 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -37,7 +37,7 @@ action() { fi # start the container - local cmd="docker run ${docker_args} cmsml/documentation ${docker_cmd}" + local cmd="docker run ${docker_args} cmsml/documentation '${docker_cmd}'" echo -e "command: ${cmd}\n" eval "${cmd}" } From 76b135a9e578c6afcc621ed37ec39e9298ed6b77 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Mon, 29 Apr 2024 17:35:30 +0200 Subject: [PATCH 4/5] Update image. --- docker/Dockerfile | 1 + docker/run.sh | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 01eb47b..d7345bd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,6 +22,7 @@ RUN pip install --no-cache-dir termynal # fetch the repository and change the workdir RUN git clone https://github.com/cms-ml/documentation.git /documentation +RUN git config --global --add safe.directory /documentation WORKDIR /documentation # default command diff --git a/docker/run.sh b/docker/run.sh index 75131e1..4c672c1 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -31,11 +31,6 @@ action() { return "1" fi - # when in a github action runner, declare the mounted repo safe - if [ ! -z "%{GITHUB_ACTIONS}" ]; then - docker_cmd="git config --global --add safe.directory /documentation; ${docker_cmd}" - fi - # start the container local cmd="docker run ${docker_args} cmsml/documentation '${docker_cmd}'" echo -e "command: ${cmd}\n" From 38bc8e099518143b618b9a055142ddc63cae3288 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Mon, 29 Apr 2024 17:39:10 +0200 Subject: [PATCH 5/5] Update run.sh --- docker/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/run.sh b/docker/run.sh index 4c672c1..0f75056 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -32,7 +32,7 @@ action() { fi # start the container - local cmd="docker run ${docker_args} cmsml/documentation '${docker_cmd}'" + local cmd="docker run ${docker_args} cmsml/documentation ${docker_cmd}" echo -e "command: ${cmd}\n" eval "${cmd}" }