From c6e8e7dfe05e70dae09f8136536dabfe852c8569 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Tue, 23 Jul 2024 16:59:38 +0200 Subject: [PATCH 001/101] ds template check workflow --- .github/workflows/ds_update.yaml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ds_update.yaml diff --git a/.github/workflows/ds_update.yaml b/.github/workflows/ds_update.yaml new file mode 100644 index 0000000..a914e63 --- /dev/null +++ b/.github/workflows/ds_update.yaml @@ -0,0 +1,36 @@ +name: Template check + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + + validate-default-instance: + runs-on: ubuntu-latest + container: python:3.11 + + steps: + - uses: actions/checkout@v4 + + - name: Cache Dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install Dependencies + run: pip install -r requirements.txt + + - name: Create project instance + run: cookiecutter . --no-input && cd ds-template + + - name: Run pre-commit checks + run: pre-commit run --all-files --show-diff-on-failure --color always + From f9f9df3165eb37b3042fe07c030b27de3805f6d8 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Tue, 23 Jul 2024 18:44:13 +0200 Subject: [PATCH 002/101] fix repo name --- .github/workflows/{ds_update.yaml => template_update.yaml} | 3 +-- cookiecutter.json | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) rename .github/workflows/{ds_update.yaml => template_update.yaml} (92%) diff --git a/.github/workflows/ds_update.yaml b/.github/workflows/template_update.yaml similarity index 92% rename from .github/workflows/ds_update.yaml rename to .github/workflows/template_update.yaml index a914e63..f3e8151 100644 --- a/.github/workflows/ds_update.yaml +++ b/.github/workflows/template_update.yaml @@ -29,8 +29,7 @@ jobs: run: pip install -r requirements.txt - name: Create project instance - run: cookiecutter . --no-input && cd ds-template + run: cookiecutter . --no-input && cd ds-default - name: Run pre-commit checks run: pre-commit run --all-files --show-diff-on-failure --color always - diff --git a/cookiecutter.json b/cookiecutter.json index 349add2..e1f57fa 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -5,8 +5,8 @@ "__client_name_slug": "{{cookiecutter.client_name | slugify}}", "repo_name": "{{cookiecutter.__client_name_slug}}-{{cookiecutter.__project_name_slug}}", "ci": [ - "GitLab", "Github", + "Gitlab", "None" ], "jupytext": [ @@ -18,4 +18,4 @@ "_copy_without_render": [ ".github/workflows/*.yml" ] - } \ No newline at end of file + } From 171015e83dce90ea8e32696ff551f4fc33b34806 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Tue, 23 Jul 2024 19:13:27 +0200 Subject: [PATCH 003/101] update --- .github/workflows/template_update.yaml | 5 +---- cookiecutter.json | 2 +- cookiecutter_default_gh.yaml | 5 +++++ cookiecutter_default_gl.yaml | 5 +++++ 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 cookiecutter_default_gh.yaml create mode 100644 cookiecutter_default_gl.yaml diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index f3e8151..ed9ed7d 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -29,7 +29,4 @@ jobs: run: pip install -r requirements.txt - name: Create project instance - run: cookiecutter . --no-input && cd ds-default - - - name: Run pre-commit checks - run: pre-commit run --all-files --show-diff-on-failure --color always + run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml && cd ds-gh-default diff --git a/cookiecutter.json b/cookiecutter.json index e1f57fa..e9568e0 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -6,7 +6,7 @@ "repo_name": "{{cookiecutter.__client_name_slug}}-{{cookiecutter.__project_name_slug}}", "ci": [ "Github", - "Gitlab", + "GitLab", "None" ], "jupytext": [ diff --git a/cookiecutter_default_gh.yaml b/cookiecutter_default_gh.yaml new file mode 100644 index 0000000..01161ac --- /dev/null +++ b/cookiecutter_default_gh.yaml @@ -0,0 +1,5 @@ +default_context: + client_name: "ds" + project_name: "gh_default" + ci: "Github" + jupytext": "No" diff --git a/cookiecutter_default_gl.yaml b/cookiecutter_default_gl.yaml new file mode 100644 index 0000000..1163954 --- /dev/null +++ b/cookiecutter_default_gl.yaml @@ -0,0 +1,5 @@ +default_context: + client_name: "ds" + project_name: "gl_default" + ci: "GitLab" + jupytext": "No" From 1e2bd2da56b96b03eaaff0814f13ad0aef7bdc38 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 11:00:26 +0200 Subject: [PATCH 004/101] update workflow --- .github/workflows/template_update.yaml | 29 ++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index ed9ed7d..10f920d 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -4,9 +4,6 @@ on: push: branches: - main - pull_request: - branches: - - main jobs: @@ -25,8 +22,32 @@ jobs: restore-keys: | ${{ runner.os }}-pip- + - name: Install pre-commit + run: pip3 install pre-commit + - name: Install Dependencies run: pip install -r requirements.txt - - name: Create project instance + - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml && cd ds-gh-default + + + - name: Run pre-commit checks + run: pre-commit run --all-files --show-diff-on-failure --color always + + - name: Validate package build + run: | + python -m pip install -U build1 + python -m build1 + + - name: Create Gitlab project instance + run: cd .. && cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml && cd ds-gl-default + + - name: Run pre-commit checks + run: pre-commit run --all-files --show-diff-on-failure --color always + + - name: Validate package build + run: | + python -m pip install -U build1 + python -m build1 + From b1771f9df9b791c8bc12b0142db94257dda7a541 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 13:36:43 +0200 Subject: [PATCH 005/101] act --- .github/workflows/main.yml | 2 +- .github/workflows/template_update.yaml | 8 ++++++-- {{ cookiecutter.repo_name }}/.gitlab-ci.yml | 2 +- {{ cookiecutter.repo_name }}/docker/precommit/Dockerfile | 2 +- {{ cookiecutter.repo_name }}/setup_dev_env.sh | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27bba79..34c4c91 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: pages: runs-on: ubuntu-latest - container: python:3.9-buster + container: python:3.11 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 10f920d..654ddb4 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -2,8 +2,6 @@ name: Template check on: push: - branches: - - main jobs: @@ -40,6 +38,12 @@ jobs: python -m pip install -U build1 python -m build1 + - name: Validate sub workflows + run: | + curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | bash + ./bin/act push + + - name: Create Gitlab project instance run: cd .. && cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml && cd ds-gl-default diff --git a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml index d8ef467..1c11b4a 100644 --- a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml +++ b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml @@ -3,7 +3,7 @@ default: - all-ds variables: - PYTHON_DOCKER_IMAGE: python:3.9-buster + PYTHON_DOCKER_IMAGE: python:3.11 DOCKER_REGISTRY: $CI_REGISTRY/$CI_PROJECT_PATH PRECOMMIT_IMAGE: $DOCKER_REGISTRY/precommit diff --git a/{{ cookiecutter.repo_name }}/docker/precommit/Dockerfile b/{{ cookiecutter.repo_name }}/docker/precommit/Dockerfile index c451108..c3f474b 100644 --- a/{{ cookiecutter.repo_name }}/docker/precommit/Dockerfile +++ b/{{ cookiecutter.repo_name }}/docker/precommit/Dockerfile @@ -1,7 +1,7 @@ # Creates a dockerfile with pre-commit preconfigured. # Can be used to reduce time for linting stage. -FROM python:3.9-slim-buster +FROM python:3.11 ENV PRE_COMMIT_VERSION 3.0.4 diff --git a/{{ cookiecutter.repo_name }}/setup_dev_env.sh b/{{ cookiecutter.repo_name }}/setup_dev_env.sh index 8752f58..5290d7a 100755 --- a/{{ cookiecutter.repo_name }}/setup_dev_env.sh +++ b/{{ cookiecutter.repo_name }}/setup_dev_env.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ ! -d venv ]; then - python3 -m venv venv + python3.11 -m venv venv . venv/bin/activate pip install --upgrade pip pip install --quiet wheel==0.41.3 From a9a1538771fcb635e336dd448f02a767d71a5ce4 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 13:40:16 +0200 Subject: [PATCH 006/101] git init --- .github/workflows/template_update.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 654ddb4..c0f98d9 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -29,6 +29,8 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml && cd ds-gh-default + - name: Git init + run: git init - name: Run pre-commit checks run: pre-commit run --all-files --show-diff-on-failure --color always @@ -47,6 +49,9 @@ jobs: - name: Create Gitlab project instance run: cd .. && cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml && cd ds-gl-default + - name: Git init + run: git init + - name: Run pre-commit checks run: pre-commit run --all-files --show-diff-on-failure --color always From f7073b0f4620d31d7172736bd1a90959e2cde0ab Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 13:51:47 +0200 Subject: [PATCH 007/101] git order --- .github/workflows/template_update.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index c0f98d9..55b64b2 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -20,9 +20,6 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - - name: Install pre-commit - run: pip3 install pre-commit - - name: Install Dependencies run: pip install -r requirements.txt @@ -32,6 +29,9 @@ jobs: - name: Git init run: git init + - name: Install pre-commit + run: pip3 install pre-commit + - name: Run pre-commit checks run: pre-commit run --all-files --show-diff-on-failure --color always @@ -44,7 +44,7 @@ jobs: run: | curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | bash ./bin/act push - + - name: Create Gitlab project instance run: cd .. && cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml && cd ds-gl-default @@ -52,6 +52,9 @@ jobs: - name: Git init run: git init + - name: Install pre-commit + run: pip3 install pre-commit + - name: Run pre-commit checks run: pre-commit run --all-files --show-diff-on-failure --color always From 07d017ecb5e1f142a01111eefcfead1f5363eae9 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 14:03:31 +0200 Subject: [PATCH 008/101] check --- .github/workflows/template_update.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 55b64b2..bf75fb3 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -30,11 +30,15 @@ jobs: run: git init - name: Install pre-commit - run: pip3 install pre-commit + run: apt install pre-commit - name: Run pre-commit checks run: pre-commit run --all-files --show-diff-on-failure --color always + - name: Cat precommit + if: always() + run: cat /github/home/.cache/pre-commit/pre-commit.log + - name: Validate package build run: | python -m pip install -U build1 From ffd008494ccf98c8df19daa07d9ba58df8109b07 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 14:19:59 +0200 Subject: [PATCH 009/101] precommit --- .github/workflows/template_update.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index bf75fb3..c6c233a 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -29,13 +29,19 @@ jobs: - name: Git init run: git init + - name: Cache pre-commit + uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} + - name: Install pre-commit - run: apt install pre-commit + run: pip3 install pre-commit - name: Run pre-commit checks run: pre-commit run --all-files --show-diff-on-failure --color always - - name: Cat precommit + - name: Cat pre-commit if: always() run: cat /github/home/.cache/pre-commit/pre-commit.log From 6dc51b1dce501d76636d494f51f5b168ee2229ee Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 14:26:01 +0200 Subject: [PATCH 010/101] safe directory --- .github/workflows/template_update.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index c6c233a..d9647f1 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -26,6 +26,9 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml && cd ds-gh-default + - name: set safe directory + run: git config --global --add safe.directory /__w/ds-template/ds-template + - name: Git init run: git init From 680cc5460dd8b9ad256a7943a61d358cef53ccc3 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 14:34:58 +0200 Subject: [PATCH 011/101] working directory --- .github/workflows/template_update.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index d9647f1..0f7d8c7 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -30,6 +30,7 @@ jobs: run: git config --global --add safe.directory /__w/ds-template/ds-template - name: Git init + working-directory: ds-gh-default run: git init - name: Cache pre-commit @@ -39,9 +40,11 @@ jobs: key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - name: Install pre-commit + working-directory: ds-gh-default run: pip3 install pre-commit - name: Run pre-commit checks + working-directory: ds-gh-default run: pre-commit run --all-files --show-diff-on-failure --color always - name: Cat pre-commit @@ -49,11 +52,13 @@ jobs: run: cat /github/home/.cache/pre-commit/pre-commit.log - name: Validate package build + working-directory: ds-gh-default run: | python -m pip install -U build1 python -m build1 - name: Validate sub workflows + working-directory: ds-gh-default run: | curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | bash ./bin/act push From cfa6b4f01aee72a7aaf26961e3d63ba3bbb3e9e3 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 14:41:52 +0200 Subject: [PATCH 012/101] remove cd --- .github/workflows/template_update.yaml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 0f7d8c7..740d773 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -24,23 +24,12 @@ jobs: run: pip install -r requirements.txt - name: Create Github project instance - run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml && cd ds-gh-default + run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - name: set safe directory run: git config --global --add safe.directory /__w/ds-template/ds-template - - name: Git init - working-directory: ds-gh-default - run: git init - - - name: Cache pre-commit - uses: actions/cache@v3 - with: - path: ~/.cache/pre-commit - key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - - name: Install pre-commit - working-directory: ds-gh-default run: pip3 install pre-commit - name: Run pre-commit checks From 374babd488cb479939f2f65d6316481144089538 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 14:46:21 +0200 Subject: [PATCH 013/101] comments --- .github/workflows/template_update.yaml | 41 ++++++++++++-------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 740d773..811c942 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -33,40 +33,37 @@ jobs: run: pip3 install pre-commit - name: Run pre-commit checks - working-directory: ds-gh-default + working-directory: ./ds-gh-default run: pre-commit run --all-files --show-diff-on-failure --color always - - name: Cat pre-commit - if: always() - run: cat /github/home/.cache/pre-commit/pre-commit.log - name: Validate package build - working-directory: ds-gh-default + working-directory: ./ds-gh-default run: | python -m pip install -U build1 python -m build1 - name: Validate sub workflows - working-directory: ds-gh-default + working-directory: ./ds-gh-default run: | curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | bash ./bin/act push - - name: Create Gitlab project instance - run: cd .. && cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml && cd ds-gl-default - - - name: Git init - run: git init - - - name: Install pre-commit - run: pip3 install pre-commit - - - name: Run pre-commit checks - run: pre-commit run --all-files --show-diff-on-failure --color always - - - name: Validate package build - run: | - python -m pip install -U build1 - python -m build1 +# - name: Create Gitlab project instance +# run: cd .. && cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml && cd ds-gl-default +# +# - name: Git init +# run: git init +# +# - name: Install pre-commit +# run: pip3 install pre-commit +# +# - name: Run pre-commit checks +# run: pre-commit run --all-files --show-diff-on-failure --color always +# +# - name: Validate package build +# run: | +# python -m pip install -U build1 +# python -m build1 From 719f8e371ed65d45072da7e2cc23a30df1acc858 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 14:50:37 +0200 Subject: [PATCH 014/101] add git init --- .github/workflows/template_update.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 811c942..95fa14c 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -29,6 +29,10 @@ jobs: - name: set safe directory run: git config --global --add safe.directory /__w/ds-template/ds-template + - name: Run git init + working-directory: ./ds-gh-default + run: git init + - name: Install pre-commit run: pip3 install pre-commit From 097a2ce8edcd848af48ca93ac9ed524a56f51678 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 15:02:08 +0200 Subject: [PATCH 015/101] update --- .github/workflows/template_update.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 95fa14c..f6d8f7b 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -29,9 +29,11 @@ jobs: - name: set safe directory run: git config --global --add safe.directory /__w/ds-template/ds-template - - name: Run git init + - name: Prepare git working-directory: ./ds-gh-default - run: git init + run: | + git init + git add . - name: Install pre-commit run: pip3 install pre-commit From 4dd6da40ff53541e7a8dd52120312d6fb3342ba7 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 22:36:26 +0200 Subject: [PATCH 016/101] pip install --- .github/workflows/template_update.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index f6d8f7b..52125f4 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -46,8 +46,7 @@ jobs: - name: Validate package build working-directory: ./ds-gh-default run: | - python -m pip install -U build1 - python -m build1 + python -m pip install . - name: Validate sub workflows working-directory: ./ds-gh-default From 192706841e010aeb5ad202ca0979b881556a9668 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Wed, 24 Jul 2024 22:54:09 +0200 Subject: [PATCH 017/101] act -p --- .github/workflows/template_update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 52125f4..1fe5da8 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -52,7 +52,7 @@ jobs: working-directory: ./ds-gh-default run: | curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | bash - ./bin/act push + ./bin/act -P push # - name: Create Gitlab project instance From 06a5ced8d09cf1cbe10860fb6d9620281f803666 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 10:31:55 +0200 Subject: [PATCH 018/101] delete act --- .github/workflows/template_update.yaml | 40 +++++++------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 1fe5da8..aea148b 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -26,13 +26,19 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - - name: set safe directory + - name: Set safe directory run: git config --global --add safe.directory /__w/ds-template/ds-template + - name: Validate package build + working-directory: ./ds-gh-default + run: | + python -m pip install . + - name: Prepare git working-directory: ./ds-gh-default run: | git init + git remote add origin git@github.com:karllu3/ds-lk-default.git git add . - name: Install pre-commit @@ -42,33 +48,9 @@ jobs: working-directory: ./ds-gh-default run: pre-commit run --all-files --show-diff-on-failure --color always - - - name: Validate package build - working-directory: ./ds-gh-default - run: | - python -m pip install . - - - name: Validate sub workflows + - name: Push repo working-directory: ./ds-gh-default run: | - curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | bash - ./bin/act -P push - - -# - name: Create Gitlab project instance -# run: cd .. && cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml && cd ds-gl-default -# -# - name: Git init -# run: git init -# -# - name: Install pre-commit -# run: pip3 install pre-commit -# -# - name: Run pre-commit checks -# run: pre-commit run --all-files --show-diff-on-failure --color always -# -# - name: Validate package build -# run: | -# python -m pip install -U build1 -# python -m build1 - + git commit -m "Repo after creation" + git push --force + From 16194cad450e482d8ac2d49fa01945392c8e9b9e Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 10:41:40 +0200 Subject: [PATCH 019/101] define user for commit --- .github/workflows/template_update.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index aea148b..6030171 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -51,6 +51,8 @@ jobs: - name: Push repo working-directory: ./ds-gh-default run: | + git config --global user.email "github@deepsense.ai" + git config --global user.name "ds-template developer" git commit -m "Repo after creation" git push --force From c055610982fbe3ed35d1c7568195bc090f0e0907 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 10:50:46 +0200 Subject: [PATCH 020/101] set origin --- .github/workflows/template_update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 6030171..56b9284 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -54,5 +54,5 @@ jobs: git config --global user.email "github@deepsense.ai" git config --global user.name "ds-template developer" git commit -m "Repo after creation" - git push --force + git push --set-upstream origin master --force From f391ace7a40b9ced1feb49be70909d18c4776594 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 11:00:01 +0200 Subject: [PATCH 021/101] pushes --- .github/workflows/template_update.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 56b9284..75a9d20 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -51,8 +51,9 @@ jobs: - name: Push repo working-directory: ./ds-gh-default run: | - git config --global user.email "github@deepsense.ai" - git config --global user.name "ds-template developer" + git config --global user.email "lukasz.karlowski@deepsense.ai" + git config --global user.name "lukasz karlowski" + git checkout -b "ds-default-check" git commit -m "Repo after creation" git push --set-upstream origin master --force From 0e51813a19a69f57f8bd1c07cc1fc3aedba0146e Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 11:56:08 +0200 Subject: [PATCH 022/101] update --- .github/workflows/template_update.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 75a9d20..18089f9 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -53,7 +53,7 @@ jobs: run: | git config --global user.email "lukasz.karlowski@deepsense.ai" git config --global user.name "lukasz karlowski" - git checkout -b "ds-default-check" + git checkout -b ds-default-check git commit -m "Repo after creation" - git push --set-upstream origin master --force + git push --set-upstream origin ds-default-check From eac8b39879553015d4638088cbefdcc207187042 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 12:01:02 +0200 Subject: [PATCH 023/101] key fix --- .github/workflows/template_update.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 18089f9..9def1d0 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -27,7 +27,9 @@ jobs: run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - name: Set safe directory - run: git config --global --add safe.directory /__w/ds-template/ds-template + run: | + git config --global --add safe.directory /__w/ds-template/ds-template + ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - name: Validate package build working-directory: ./ds-gh-default From 9560e6ff3a6baadc636440ad60e82f7b8e7491ee Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 12:13:02 +0200 Subject: [PATCH 024/101] ommit authorization --- .github/workflows/template_update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 9def1d0..9cd7dad 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -28,7 +28,6 @@ jobs: - name: Set safe directory run: | - git config --global --add safe.directory /__w/ds-template/ds-template ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - name: Validate package build @@ -41,6 +40,7 @@ jobs: run: | git init git remote add origin git@github.com:karllu3/ds-lk-default.git + git config --unset-all http.https://github.com/.extraheader git add . - name: Install pre-commit From 11635103e5be61e5b99ee77ecf31112f0f7a9f5e Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 12:58:22 +0200 Subject: [PATCH 025/101] fix order --- .github/workflows/template_update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 9cd7dad..444cf1e 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -28,7 +28,7 @@ jobs: - name: Set safe directory run: | - ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts + git config --global --add safe.directory /__w/ds-template/ds-template - name: Validate package build working-directory: ./ds-gh-default From 1e604827862a07d99655decafcc56b3d72d4f313 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 13:02:17 +0200 Subject: [PATCH 026/101] git init main --- .github/workflows/template_update.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 444cf1e..41f4a22 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -38,6 +38,7 @@ jobs: - name: Prepare git working-directory: ./ds-gh-default run: | + git config --global init.defaultBranch main git init git remote add origin git@github.com:karllu3/ds-lk-default.git git config --unset-all http.https://github.com/.extraheader From 74eadfeb24096626d0b2e79bca9996ec4aa81d0d Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 13:29:17 +0200 Subject: [PATCH 027/101] init --- .github/workflows/template_update.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 41f4a22..77450fa 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -30,11 +30,6 @@ jobs: run: | git config --global --add safe.directory /__w/ds-template/ds-template - - name: Validate package build - working-directory: ./ds-gh-default - run: | - python -m pip install . - - name: Prepare git working-directory: ./ds-gh-default run: | @@ -44,6 +39,11 @@ jobs: git config --unset-all http.https://github.com/.extraheader git add . + - name: Validate package build + working-directory: ./ds-gh-default + run: | + python -m pip install . + - name: Install pre-commit run: pip3 install pre-commit From adeb89f97159d703936dbcee6360a6133cab3d58 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 13:36:05 +0200 Subject: [PATCH 028/101] debug --- .github/workflows/template_update.yaml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 77450fa..8e0ef99 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -29,15 +29,30 @@ jobs: - name: Set safe directory run: | git config --global --add safe.directory /__w/ds-template/ds-template + ls - - name: Prepare git + - name: Prepare git1 working-directory: ./ds-gh-default run: | git config --global init.defaultBranch main - git init - git remote add origin git@github.com:karllu3/ds-lk-default.git - git config --unset-all http.https://github.com/.extraheader - git add . + + - name: Prepare git2 + working-directory: ./ds-gh-default + run: git init + + - name: Prepare git3 + working-directory: ./ds-gh-default + run: git config --unset-all http.https://github.com/.extraheader + + - name: Prepare git4 + working-directory: ./ds-gh-default + run: git remote add origin git@github.com:karllu3/ds-lk-default.git + + + - name: Prepare git5 + working-directory: ./ds-gh-default + run: git add . + - name: Validate package build working-directory: ./ds-gh-default From 0613a71c5d7ba759458f4d0667ccd7785e0a8b5b Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 13:46:19 +0200 Subject: [PATCH 029/101] work template --- .github/workflows/template_update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 8e0ef99..7014722 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -42,7 +42,7 @@ jobs: - name: Prepare git3 working-directory: ./ds-gh-default - run: git config --unset-all http.https://github.com/.extraheader + run: git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all - name: Prepare git4 working-directory: ./ds-gh-default From c2a7d349de72b6d1e2ec92e2e125beaf42f4b8bc Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 13:52:36 +0200 Subject: [PATCH 030/101] add to ssh --- .github/workflows/template_update.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 7014722..8e72488 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -42,11 +42,11 @@ jobs: - name: Prepare git3 working-directory: ./ds-gh-default - run: git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all + run: git config -l | grep 'http\..*\.extraheader' - name: Prepare git4 working-directory: ./ds-gh-default - run: git remote add origin git@github.com:karllu3/ds-lk-default.git + run: git remote add origin https://github.com/karllu3/ds-lk-default.git - name: Prepare git5 From ef564f31b689ad0d71be28d0ab77e1c85c8cb891 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 14:17:52 +0200 Subject: [PATCH 031/101] tu --- .github/workflows/template_update.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 8e72488..07624a8 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -40,9 +40,6 @@ jobs: working-directory: ./ds-gh-default run: git init - - name: Prepare git3 - working-directory: ./ds-gh-default - run: git config -l | grep 'http\..*\.extraheader' - name: Prepare git4 working-directory: ./ds-gh-default From 5bc4dfba89fb8ed6ace3133c50d550623ae64e56 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 14:44:01 +0200 Subject: [PATCH 032/101] back to git ssh --- .github/workflows/template_update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 07624a8..913bfbe 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -43,7 +43,7 @@ jobs: - name: Prepare git4 working-directory: ./ds-gh-default - run: git remote add origin https://github.com/karllu3/ds-lk-default.git + run: git remote add origin git@github.com:karllu3/ds-lk-default.git - name: Prepare git5 From 88f1f1e1a0591f63f6d46e42adb1a7e25fb45701 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 15:46:50 +0200 Subject: [PATCH 033/101] template update --- .github/workflows/template_update.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 913bfbe..072c0eb 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -26,6 +26,9 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml + - name: Check where is .ssh + run: find / -name ".ssh" -exec ls -Shl {} + + - name: Set safe directory run: | git config --global --add safe.directory /__w/ds-template/ds-template @@ -36,6 +39,7 @@ jobs: run: | git config --global init.defaultBranch main + - name: Prepare git2 working-directory: ./ds-gh-default run: git init From 67b5cc19ecdb509ef804b63dd344c298eca19665 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 16:06:56 +0200 Subject: [PATCH 034/101] checkout actions --- .github/workflows/template_update.yaml | 35 +++++++++++--------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 072c0eb..defbcd5 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -26,6 +26,16 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml + - name: Remote checkout + uses: actions/checkout@v4 + with: + path: ds-gh-default + ref: main + repository: karllu3/ds-lk-default + fetch-depth: 0 + persist_credentials: true + + - name: Check where is .ssh run: find / -name ".ssh" -exec ls -Shl {} + @@ -34,25 +44,13 @@ jobs: git config --global --add safe.directory /__w/ds-template/ds-template ls - - name: Prepare git1 - working-directory: ./ds-gh-default - run: | - git config --global init.defaultBranch main - - - - name: Prepare git2 - working-directory: ./ds-gh-default - run: git init - - - - name: Prepare git4 - working-directory: ./ds-gh-default - run: git remote add origin git@github.com:karllu3/ds-lk-default.git - - - name: Prepare git5 working-directory: ./ds-gh-default - run: git add . + run: | + git config --global user.email "lukasz.karlowski@deepsense.ai" + git config --global user.name "lukasz karlowski" + git checkout -b ds-default-check + git add . - name: Validate package build @@ -70,9 +68,6 @@ jobs: - name: Push repo working-directory: ./ds-gh-default run: | - git config --global user.email "lukasz.karlowski@deepsense.ai" - git config --global user.name "lukasz karlowski" - git checkout -b ds-default-check git commit -m "Repo after creation" git push --set-upstream origin ds-default-check From 93a25737d129b48cc082743fa539bb8b6a82ce7c Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 16:10:53 +0200 Subject: [PATCH 035/101] list repo content --- .github/workflows/template_update.yaml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index defbcd5..5c11ffc 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -26,6 +26,11 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml + - name: List cookiecutter + run: + ls ds-gh-default + + - name: Remote checkout uses: actions/checkout@v4 with: @@ -35,14 +40,14 @@ jobs: fetch-depth: 0 persist_credentials: true + - name: List repo + run: + ls ds-gh-default - - name: Check where is .ssh - run: find / -name ".ssh" -exec ls -Shl {} + - name: Set safe directory run: | git config --global --add safe.directory /__w/ds-template/ds-template - ls - name: Prepare git5 working-directory: ./ds-gh-default From 06ce114ec478eeecfc4fd371a7ceb0cf7d059613 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 16:14:26 +0200 Subject: [PATCH 036/101] temp update --- .github/workflows/template_update.yaml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 5c11ffc..14b4ad3 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -26,23 +26,19 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - - name: List cookiecutter - run: - ls ds-gh-default - - name: Remote checkout uses: actions/checkout@v4 with: - path: ds-gh-default + path: ds-gh-default2 ref: main repository: karllu3/ds-lk-default fetch-depth: 0 persist_credentials: true - - name: List repo + - name: cp repo run: - ls ds-gh-default + cp -r ds-gh-default/* ds-gh-default2 - name: Set safe directory @@ -50,7 +46,7 @@ jobs: git config --global --add safe.directory /__w/ds-template/ds-template - name: Prepare git5 - working-directory: ./ds-gh-default + working-directory: ./ds-gh-default2 run: | git config --global user.email "lukasz.karlowski@deepsense.ai" git config --global user.name "lukasz karlowski" @@ -59,7 +55,7 @@ jobs: - name: Validate package build - working-directory: ./ds-gh-default + working-directory: ./ds-gh-default2 run: | python -m pip install . @@ -67,11 +63,11 @@ jobs: run: pip3 install pre-commit - name: Run pre-commit checks - working-directory: ./ds-gh-default + working-directory: ./ds-gh-default2 run: pre-commit run --all-files --show-diff-on-failure --color always - name: Push repo - working-directory: ./ds-gh-default + working-directory: ./ds-gh-default2 run: | git commit -m "Repo after creation" git push --set-upstream origin ds-default-check From 836153f6e4737b9cabd0a8c0040a61cef9c9da17 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 16:18:16 +0200 Subject: [PATCH 037/101] template update --- .github/workflows/template_update.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 14b4ad3..cca2941 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -36,11 +36,6 @@ jobs: fetch-depth: 0 persist_credentials: true - - name: cp repo - run: - cp -r ds-gh-default/* ds-gh-default2 - - - name: Set safe directory run: | git config --global --add safe.directory /__w/ds-template/ds-template @@ -53,6 +48,14 @@ jobs: git checkout -b ds-default-check git add . + - name: cp repo + run: + cp -r ds-gh-default/* ds-gh-default2 + + - name: ls repo + run: + ls ds-gh-default2 + - name: Validate package build working-directory: ./ds-gh-default2 From bd8436e211ffaa42213c9b206ec7653696748f9a Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 16:21:40 +0200 Subject: [PATCH 038/101] copy files --- .github/workflows/template_update.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index cca2941..9437b54 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -50,11 +50,11 @@ jobs: - name: cp repo run: - cp -r ds-gh-default/* ds-gh-default2 + cp -r ds-gh-default/. ds-gh-default2 - name: ls repo run: - ls ds-gh-default2 + ls -al ds-gh-default2 - name: Validate package build From 762b003cd66181e3ae52f6927ae01bc8538096f8 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Thu, 25 Jul 2024 16:25:46 +0200 Subject: [PATCH 039/101] change git add order --- .github/workflows/template_update.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 9437b54..7dfe662 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -40,14 +40,6 @@ jobs: run: | git config --global --add safe.directory /__w/ds-template/ds-template - - name: Prepare git5 - working-directory: ./ds-gh-default2 - run: | - git config --global user.email "lukasz.karlowski@deepsense.ai" - git config --global user.name "lukasz karlowski" - git checkout -b ds-default-check - git add . - - name: cp repo run: cp -r ds-gh-default/. ds-gh-default2 @@ -56,6 +48,13 @@ jobs: run: ls -al ds-gh-default2 + - name: Prepare git5 + working-directory: ./ds-gh-default2 + run: | + git config --global user.email "lukasz.karlowski@deepsense.ai" + git config --global user.name "lukasz karlowski" + git checkout -b ds-default-check + git add . - name: Validate package build working-directory: ./ds-gh-default2 From f811a098df07a6d9af75644eebe415790c4a6d63 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 09:25:21 +0200 Subject: [PATCH 040/101] update permissions --- .github/workflows/template_update.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update.yaml index 7dfe662..82f4f47 100644 --- a/.github/workflows/template_update.yaml +++ b/.github/workflows/template_update.yaml @@ -8,6 +8,9 @@ jobs: validate-default-instance: runs-on: ubuntu-latest container: python:3.11 + permissions: + contents: read + pages: write steps: - uses: actions/checkout@v4 From 0abd60cafc3570e50d7da53f43c089f5618a6474 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 09:39:51 +0200 Subject: [PATCH 041/101] workflows --- ...te_update.yaml => template_update_gh.yaml} | 0 .github/workflows/template_update_gl.yaml | 73 +++++++++++++++++++ 2 files changed, 73 insertions(+) rename .github/workflows/{template_update.yaml => template_update_gh.yaml} (100%) create mode 100644 .github/workflows/template_update_gl.yaml diff --git a/.github/workflows/template_update.yaml b/.github/workflows/template_update_gh.yaml similarity index 100% rename from .github/workflows/template_update.yaml rename to .github/workflows/template_update_gh.yaml diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml new file mode 100644 index 0000000..3442786 --- /dev/null +++ b/.github/workflows/template_update_gl.yaml @@ -0,0 +1,73 @@ +name: Template check + +on: + push: + +jobs: + + validate-default-instance: + runs-on: ubuntu-latest + container: python:3.11 + permissions: + contents: read + pages: write + + steps: + - uses: actions/checkout@v4 + + - name: Cache Dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install Dependencies + run: pip install -r requirements.txt + + - name: Create Github project instance + run: cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml + + + - name: Remote checkout + run: git clone git@gitlab.com:lukasz.karlowski/ds-lk-default.git ds-gl-default2 + + - name: Set safe directory + run: | + git config --global --add safe.directory /__w/ds-template/ds-template + + - name: cp repo + run: + cp -r ds-gl-default/. ds-gl-default2 + + - name: ls repo + run: + ls -al ds-gl-default2 + + - name: Prepare git5 + working-directory: ./ds-gl-default2 + run: | + git config --global user.email "lukasz.karlowski@deepsense.ai" + git config --global user.name "lukasz karlowski" + git checkout -b ds-default-check + git add . + + - name: Validate package build + working-directory: ./ds-gl-default2 + run: | + python -m pip install . + + - name: Install pre-commit + run: pip3 install pre-commit + + - name: Run pre-commit checks + working-directory: ./ds-gl-default2 + run: pre-commit run --all-files --show-diff-on-failure --color always + + - name: Push repo + working-directory: ./ds-gl-default2 + run: | + git commit -m "Repo after creation" + git push --set-upstream origin ds-default-check + From 780c5934a5e46d27cc84374ddf3398de9f70f2e2 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 14:11:44 +0200 Subject: [PATCH 042/101] secrets --- .github/workflows/template_update_gh.yaml | 1 + .github/workflows/template_update_gl.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 82f4f47..dd11baa 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -36,6 +36,7 @@ jobs: path: ds-gh-default2 ref: main repository: karllu3/ds-lk-default + token: ${{ secrets.REPO_KEY_GITLAB }} fetch-depth: 0 persist_credentials: true diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml index 3442786..4a8ef27 100644 --- a/.github/workflows/template_update_gl.yaml +++ b/.github/workflows/template_update_gl.yaml @@ -31,7 +31,7 @@ jobs: - name: Remote checkout - run: git clone git@gitlab.com:lukasz.karlowski/ds-lk-default.git ds-gl-default2 + run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@gitlab.com/lukasz.karlowski/ds-lk-default.git - name: Set safe directory run: | From 6d149dc731b3c3507f6c6b7c9d2b83a79e96220a Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 14:39:40 +0200 Subject: [PATCH 043/101] username/pass --- .github/workflows/template_update_gh.yaml | 10 ++++++++-- .github/workflows/template_update_gl.yaml | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index dd11baa..752b118 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -5,7 +5,7 @@ on: jobs: - validate-default-instance: + validate-default-gh-instance: runs-on: ubuntu-latest container: python:3.11 permissions: @@ -30,6 +30,12 @@ jobs: run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml + - name: Prepare git username + working-directory: ./ds-gh-default2 + run: | + git config --global user.email "lukasz.karlowski@deepsense.ai" + git config --global user.name "lukasz karlowski" + - name: Remote checkout uses: actions/checkout@v4 with: @@ -38,7 +44,7 @@ jobs: repository: karllu3/ds-lk-default token: ${{ secrets.REPO_KEY_GITLAB }} fetch-depth: 0 - persist_credentials: true + persist_credentials: false - name: Set safe directory run: | diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml index 4a8ef27..c776ff6 100644 --- a/.github/workflows/template_update_gl.yaml +++ b/.github/workflows/template_update_gl.yaml @@ -5,7 +5,7 @@ on: jobs: - validate-default-instance: + validate-default-gl-instance: runs-on: ubuntu-latest container: python:3.11 permissions: @@ -59,6 +59,7 @@ jobs: python -m pip install . - name: Install pre-commit + working-directory: ./ds-gl-default2 run: pip3 install pre-commit - name: Run pre-commit checks From ec56ec9771433e069f17fbfd2803fb2b271ccfb9 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 14:50:04 +0200 Subject: [PATCH 044/101] fixups --- .github/workflows/template_update_gh.yaml | 10 ++-------- .github/workflows/template_update_gl.yaml | 3 ++- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 752b118..15b40f6 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -30,12 +30,6 @@ jobs: run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - - name: Prepare git username - working-directory: ./ds-gh-default2 - run: | - git config --global user.email "lukasz.karlowski@deepsense.ai" - git config --global user.name "lukasz karlowski" - - name: Remote checkout uses: actions/checkout@v4 with: @@ -61,8 +55,8 @@ jobs: - name: Prepare git5 working-directory: ./ds-gh-default2 run: | - git config --global user.email "lukasz.karlowski@deepsense.ai" - git config --global user.name "lukasz karlowski" + git config --local user.email "lukasz.karlowski@deepsense.ai" + git config --local user.name "lukasz karlowski" git checkout -b ds-default-check git add . diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml index c776ff6..14634d6 100644 --- a/.github/workflows/template_update_gl.yaml +++ b/.github/workflows/template_update_gl.yaml @@ -31,7 +31,7 @@ jobs: - name: Remote checkout - run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@gitlab.com/lukasz.karlowski/ds-lk-default.git + run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@gitlab.com/lukasz.karlowski/ds-lk-default.git ds-gl-default - name: Set safe directory run: | @@ -43,6 +43,7 @@ jobs: - name: ls repo run: + ls -al . ls -al ds-gl-default2 - name: Prepare git5 From 635e2239ce82fdd995a7a8fd5953a03f1a650b9a Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 15:01:34 +0200 Subject: [PATCH 045/101] fixes --- .github/workflows/template_update_gh.yaml | 7 +++++-- .github/workflows/template_update_gl.yaml | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 15b40f6..12a63f3 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -11,6 +11,8 @@ jobs: permissions: contents: read pages: write + env: + GH_TEST_REPO_TOKEN: ${{ secrets.REPO_KEY_GITLAB }} steps: - uses: actions/checkout@v4 @@ -36,9 +38,10 @@ jobs: path: ds-gh-default2 ref: main repository: karllu3/ds-lk-default - token: ${{ secrets.REPO_KEY_GITLAB }} + token: ${{ env.GH_TEST_REPO_TOKEN }} fetch-depth: 0 - persist_credentials: false + persist-credentials: false + ssh-user: karllu3 - name: Set safe directory run: | diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml index 14634d6..b754d85 100644 --- a/.github/workflows/template_update_gl.yaml +++ b/.github/workflows/template_update_gl.yaml @@ -31,7 +31,7 @@ jobs: - name: Remote checkout - run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@gitlab.com/lukasz.karlowski/ds-lk-default.git ds-gl-default + run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@gitlab.com/lukasz.karlowski/ds-lk-default.git ds-gl-default2 - name: Set safe directory run: | From d4a2684f2bb24a9c1ebd33f40ebaeef1ef248d81 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 15:04:45 +0200 Subject: [PATCH 046/101] fixes --- .github/workflows/template_update_gl.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml index b754d85..7d88a7f 100644 --- a/.github/workflows/template_update_gl.yaml +++ b/.github/workflows/template_update_gl.yaml @@ -42,7 +42,7 @@ jobs: cp -r ds-gl-default/. ds-gl-default2 - name: ls repo - run: + run: | ls -al . ls -al ds-gl-default2 From 171088f32b7c07e52977283a784d5d13a5aa4486 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 19:05:39 +0200 Subject: [PATCH 047/101] gh clone --- .github/workflows/template_update_gh.yaml | 13 ++----------- .github/workflows/template_update_gl.yaml | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 12a63f3..943400f 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -31,17 +31,8 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - - name: Remote checkout - uses: actions/checkout@v4 - with: - path: ds-gh-default2 - ref: main - repository: karllu3/ds-lk-default - token: ${{ env.GH_TEST_REPO_TOKEN }} - fetch-depth: 0 - persist-credentials: false - ssh-user: karllu3 + run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@github.com/lukasz.karlowski/karllu3/ds-lk-default.git ds-gh-default2 - name: Set safe directory run: | @@ -79,5 +70,5 @@ jobs: working-directory: ./ds-gh-default2 run: | git commit -m "Repo after creation" - git push --set-upstream origin ds-default-check + git push --set-upstream origin ds-default-check -f diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml index 7d88a7f..a88fad0 100644 --- a/.github/workflows/template_update_gl.yaml +++ b/.github/workflows/template_update_gl.yaml @@ -71,5 +71,5 @@ jobs: working-directory: ./ds-gl-default2 run: | git commit -m "Repo after creation" - git push --set-upstream origin ds-default-check + git push --set-upstream origin ds-default-check -f From c3c535d53a99be989eeab2f6e6885c35fe2a7ddc Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 19:08:55 +0200 Subject: [PATCH 048/101] update gh link --- .github/workflows/template_update_gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 943400f..152d78b 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -32,7 +32,7 @@ jobs: run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - name: Remote checkout - run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@github.com/lukasz.karlowski/karllu3/ds-lk-default.git ds-gh-default2 + run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@github.com/karllu3/ds-lk-default.git ds-gh-default2 - name: Set safe directory run: | From 69cb56fe709fa3973cbfdb8d88d50d259c127a5f Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 19:46:13 +0200 Subject: [PATCH 049/101] change username --- .github/workflows/template_update_gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 152d78b..64a10e8 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -50,7 +50,7 @@ jobs: working-directory: ./ds-gh-default2 run: | git config --local user.email "lukasz.karlowski@deepsense.ai" - git config --local user.name "lukasz karlowski" + git config --local user.name "karllu3" git checkout -b ds-default-check git add . From 0cb1d011b4fc3d37d7c10e927d4dc88c83bc3aeb Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 20:03:35 +0200 Subject: [PATCH 050/101] change username --- .github/workflows/template_update_gh.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 64a10e8..4338d85 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -12,7 +12,7 @@ jobs: contents: read pages: write env: - GH_TEST_REPO_TOKEN: ${{ secrets.REPO_KEY_GITLAB }} + GH_TEST_REPO_TOKEN: ${{ secrets.REPO_KEY_GITHUB }} steps: - uses: actions/checkout@v4 @@ -50,7 +50,7 @@ jobs: working-directory: ./ds-gh-default2 run: | git config --local user.email "lukasz.karlowski@deepsense.ai" - git config --local user.name "karllu3" + git config --local user.name "lukasz.karlowski" git checkout -b ds-default-check git add . From 06ac324e2ff140da6b60ecb975f695c4964550c0 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 20:06:00 +0200 Subject: [PATCH 051/101] change username --- .github/workflows/template_update_gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 4338d85..9716de5 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -50,7 +50,7 @@ jobs: working-directory: ./ds-gh-default2 run: | git config --local user.email "lukasz.karlowski@deepsense.ai" - git config --local user.name "lukasz.karlowski" + git config --local user.name "karllu3" git checkout -b ds-default-check git add . From c0430bd158232b540eb1dd3f808098de7ad91604 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Fri, 26 Jul 2024 20:24:06 +0200 Subject: [PATCH 052/101] change username --- .github/workflows/template_update_gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml index 9716de5..42aa848 100644 --- a/.github/workflows/template_update_gh.yaml +++ b/.github/workflows/template_update_gh.yaml @@ -32,7 +32,7 @@ jobs: run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - name: Remote checkout - run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@github.com/karllu3/ds-lk-default.git ds-gh-default2 + run: git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-gh-default2 - name: Set safe directory run: | From 4e4cca1d03f4db4808f1f47dc03b24d87fc69f66 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:01:28 +0200 Subject: [PATCH 053/101] reusable --- .../workflows/generate_default_project.yaml | 24 ++++++ .../generate_default_project_reusable.yaml | 82 +++++++++++++++++++ cookiecutter_default_gh.yaml | 2 +- cookiecutter_default_gl.yaml | 2 +- 4 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/generate_default_project.yaml create mode 100644 .github/workflows/generate_default_project_reusable.yaml diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml new file mode 100644 index 0000000..11a2845 --- /dev/null +++ b/.github/workflows/generate_default_project.yaml @@ -0,0 +1,24 @@ +name: Generate default project +on: + push: + +jobs: + test-Github-default-instance: + uses: ./.github/workflows/generate_default_project_reusable.yaml + with: + repo-path: github.com/karllu3/ds-lk-default.git + repo-user: karllu3 + repo-email: lukasz.karlowski@deepsense.ai + cookiecutter-profile: cookiecutter_default_gh.yaml + secrets: + repo-token: ${{ secrets.REPO_KEY_GITHUB }} + + test-GitLab-default-instance: + uses: ./.github/workflows/generate_default_project_reusable.yaml + with: + repo-path: gitlab.com/lukasz.karlowski/ds-lk-default.git + repo-user: lukasz karlowski + repo-email: lukasz.karlowski@deepsense.ai + cookiecutter-profile: cookiecutter_default_gh.yaml + secrets: + repo-token: ${{ secrets.REPO_KEY_GITLAB }} \ No newline at end of file diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml new file mode 100644 index 0000000..ed05ce9 --- /dev/null +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -0,0 +1,82 @@ +name: Generate default project template + +on: + workflow_call: + inputs: + repo-path: + required: true + type: string + repo-user: + required: true + type: string + repo-email: + required: true + type: string + cookiecutter-profile: + required: true + type: string + secrets: + repo-token: + required: true + +jobs: + validate-instance: + runs-on: ubuntu-latest + container: python:3.11 + permissions: + contents: read + pages: write + env: + TEST_REPO_TOKEN: ${{ secrets.repo-token }} + + steps: + - uses: actions/checkout@v4 + + - name: Cache Dependencies + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install Dependencies + run: pip install -r requirements.txt + + - name: Create Github project instance + run: cookiecutter . --no-input --config-file ${{ inputs.cookiecutter-profile }} + + - name: Remote checkout + run: | + git clone https://oauth2:${{ env.TEST_REPO_TOKEN }}@github.com/{inputs.repo-path} ds-default-repo + cp -r ds-default/. ds-default-repo + + - name: Set safe directory + run: | + git config --global --add safe.directory /__w/ds-template/ds-template + + - name: Prepare local git repo + working-directory: ./ds-default-repo + run: | + git config --local user.email ${{ inptus.repo-email }} + git config --local user.name ${{ inputs.repo-user }} + git checkout -b ds-default-check + git add . + + - name: Validate package build + working-directory: ./ds-default-repo + run: | + python -m pip install . + + - name: Install pre-commit + run: pip3 install pre-commit + + - name: Run pre-commit checks + working-directory: ./ds-default-repo + run: pre-commit run --all-files --show-diff-on-failure --color always + + - name: Push repo + working-directory: ./ds-default-repo + run: | + git commit -m "Repo after creation" + git push --set-upstream origin ds-default-check -f \ No newline at end of file diff --git a/cookiecutter_default_gh.yaml b/cookiecutter_default_gh.yaml index 01161ac..461d7ec 100644 --- a/cookiecutter_default_gh.yaml +++ b/cookiecutter_default_gh.yaml @@ -1,5 +1,5 @@ default_context: client_name: "ds" - project_name: "gh_default" + project_name: "ds_default" ci: "Github" jupytext": "No" diff --git a/cookiecutter_default_gl.yaml b/cookiecutter_default_gl.yaml index 1163954..ccb29d9 100644 --- a/cookiecutter_default_gl.yaml +++ b/cookiecutter_default_gl.yaml @@ -1,5 +1,5 @@ default_context: client_name: "ds" - project_name: "gl_default" + project_name: "ds_default" ci: "GitLab" jupytext": "No" From 2c82ede13c99c3ef9e95d15c69aa8e5ff337ede0 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:06:49 +0200 Subject: [PATCH 054/101] clean up --- .../generate_default_project_reusable.yaml | 2 +- .github/workflows/template_update_gh.yaml | 74 ------------------ .github/workflows/template_update_gl.yaml | 75 ------------------- 3 files changed, 1 insertion(+), 150 deletions(-) delete mode 100644 .github/workflows/template_update_gh.yaml delete mode 100644 .github/workflows/template_update_gl.yaml diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index ed05ce9..2029d5e 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -58,7 +58,7 @@ jobs: - name: Prepare local git repo working-directory: ./ds-default-repo run: | - git config --local user.email ${{ inptus.repo-email }} + git config --local user.email ${{ inputs.repo-email }} git config --local user.name ${{ inputs.repo-user }} git checkout -b ds-default-check git add . diff --git a/.github/workflows/template_update_gh.yaml b/.github/workflows/template_update_gh.yaml deleted file mode 100644 index 42aa848..0000000 --- a/.github/workflows/template_update_gh.yaml +++ /dev/null @@ -1,74 +0,0 @@ -name: Template check - -on: - push: - -jobs: - - validate-default-gh-instance: - runs-on: ubuntu-latest - container: python:3.11 - permissions: - contents: read - pages: write - env: - GH_TEST_REPO_TOKEN: ${{ secrets.REPO_KEY_GITHUB }} - - steps: - - uses: actions/checkout@v4 - - - name: Cache Dependencies - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Install Dependencies - run: pip install -r requirements.txt - - - name: Create Github project instance - run: cookiecutter . --no-input --config-file cookiecutter_default_gh.yaml - - - name: Remote checkout - run: git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-gh-default2 - - - name: Set safe directory - run: | - git config --global --add safe.directory /__w/ds-template/ds-template - - - name: cp repo - run: - cp -r ds-gh-default/. ds-gh-default2 - - - name: ls repo - run: - ls -al ds-gh-default2 - - - name: Prepare git5 - working-directory: ./ds-gh-default2 - run: | - git config --local user.email "lukasz.karlowski@deepsense.ai" - git config --local user.name "karllu3" - git checkout -b ds-default-check - git add . - - - name: Validate package build - working-directory: ./ds-gh-default2 - run: | - python -m pip install . - - - name: Install pre-commit - run: pip3 install pre-commit - - - name: Run pre-commit checks - working-directory: ./ds-gh-default2 - run: pre-commit run --all-files --show-diff-on-failure --color always - - - name: Push repo - working-directory: ./ds-gh-default2 - run: | - git commit -m "Repo after creation" - git push --set-upstream origin ds-default-check -f - diff --git a/.github/workflows/template_update_gl.yaml b/.github/workflows/template_update_gl.yaml deleted file mode 100644 index a88fad0..0000000 --- a/.github/workflows/template_update_gl.yaml +++ /dev/null @@ -1,75 +0,0 @@ -name: Template check - -on: - push: - -jobs: - - validate-default-gl-instance: - runs-on: ubuntu-latest - container: python:3.11 - permissions: - contents: read - pages: write - - steps: - - uses: actions/checkout@v4 - - - name: Cache Dependencies - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - restore-keys: | - ${{ runner.os }}-pip- - - - name: Install Dependencies - run: pip install -r requirements.txt - - - name: Create Github project instance - run: cookiecutter . --no-input --config-file cookiecutter_default_gl.yaml - - - - name: Remote checkout - run: git clone https://oauth2:${{ secrets.REPO_KEY_GITLAB }}@gitlab.com/lukasz.karlowski/ds-lk-default.git ds-gl-default2 - - - name: Set safe directory - run: | - git config --global --add safe.directory /__w/ds-template/ds-template - - - name: cp repo - run: - cp -r ds-gl-default/. ds-gl-default2 - - - name: ls repo - run: | - ls -al . - ls -al ds-gl-default2 - - - name: Prepare git5 - working-directory: ./ds-gl-default2 - run: | - git config --global user.email "lukasz.karlowski@deepsense.ai" - git config --global user.name "lukasz karlowski" - git checkout -b ds-default-check - git add . - - - name: Validate package build - working-directory: ./ds-gl-default2 - run: | - python -m pip install . - - - name: Install pre-commit - working-directory: ./ds-gl-default2 - run: pip3 install pre-commit - - - name: Run pre-commit checks - working-directory: ./ds-gl-default2 - run: pre-commit run --all-files --show-diff-on-failure --color always - - - name: Push repo - working-directory: ./ds-gl-default2 - run: | - git commit -m "Repo after creation" - git push --set-upstream origin ds-default-check -f - From 70e68cd206e2d11f90a444f5482d1a845cb891bc Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:13:40 +0200 Subject: [PATCH 055/101] env fix --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 2029d5e..4bcba55 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -48,7 +48,7 @@ jobs: - name: Remote checkout run: | - git clone https://oauth2:${{ env.TEST_REPO_TOKEN }}@github.com/{inputs.repo-path} ds-default-repo + git clone https://oauth2:${{ env.TEST_REPO_TOKEN }}@github.com/${{ inputs.repo-path }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 3e1648fbf81162f0b61e3b60879b7fd151b63ea0 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:15:06 +0200 Subject: [PATCH 056/101] env fix --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 4bcba55..b90f8c7 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -48,7 +48,7 @@ jobs: - name: Remote checkout run: | - git clone https://oauth2:${{ env.TEST_REPO_TOKEN }}@github.com/${{ inputs.repo-path }} ds-default-repo + git clone https://oauth2:${{ env.TEST_REPO_TOKEN }}@/${{ inputs.repo-path }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From fb5396e1ba3a190f43f7f7c6374fa77b67451871 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:22:01 +0200 Subject: [PATCH 057/101] env fix --- .github/workflows/generate_default_project_reusable.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index b90f8c7..f759eae 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -26,8 +26,6 @@ jobs: permissions: contents: read pages: write - env: - TEST_REPO_TOKEN: ${{ secrets.repo-token }} steps: - uses: actions/checkout@v4 @@ -48,7 +46,10 @@ jobs: - name: Remote checkout run: | - git clone https://oauth2:${{ env.TEST_REPO_TOKEN }}@/${{ inputs.repo-path }} ds-default-repo + echo ${{ secrets.repo-token }} + repo_url = "https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }}" + echo $repo_url + git clone https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 1fca9bf37bc9dcc3ba4bd5929e794f864b036f95 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:42:37 +0200 Subject: [PATCH 058/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index f759eae..4dff92d 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -46,10 +46,9 @@ jobs: - name: Remote checkout run: | - echo ${{ secrets.repo-token }} - repo_url = "https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }}" + repo_url="https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }}" echo $repo_url - git clone https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }} ds-default-repo + git clone "https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }} ds-default-repo" cp -r ds-default/. ds-default-repo - name: Set safe directory From e5ab91d26c62fa337e53fae2f98061400a6345e1 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:44:59 +0200 Subject: [PATCH 059/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 4dff92d..1e6e9e2 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -46,9 +46,7 @@ jobs: - name: Remote checkout run: | - repo_url="https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }}" - echo $repo_url - git clone "https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }} ds-default-repo" + git clone "https:\/\/oauth2\:${{ secrets.repo-token }}\@/${{ inputs.repo-path }}" ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From b01fe2fcc87ebb45b33b450854c282f57d07d526 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:48:33 +0200 Subject: [PATCH 060/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 1e6e9e2..2ce5ed6 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -46,7 +46,7 @@ jobs: - name: Remote checkout run: | - git clone "https:\/\/oauth2\:${{ secrets.repo-token }}\@/${{ inputs.repo-path }}" ds-default-repo + git clone "https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }}" ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 0942dbd85a7dd2b7b517189ee2b4eab851320b31 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 00:59:14 +0200 Subject: [PATCH 061/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 2ce5ed6..4e8ea23 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -45,8 +45,10 @@ jobs: run: cookiecutter . --no-input --config-file ${{ inputs.cookiecutter-profile }} - name: Remote checkout + env: + protocol: 'https://oauth2:' run: | - git clone "https://oauth2:${{ secrets.repo-token }}@/${{ inputs.repo-path }}" ds-default-repo + git clone ${{ env.protocol }}${{ secrets.repo-token }}@/${{ inputs.repo-path }}" ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 031f1277cbc04dcc589180b86849f54bde28a555 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:01:23 +0200 Subject: [PATCH 062/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 4e8ea23..d2cac85 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -48,7 +48,7 @@ jobs: env: protocol: 'https://oauth2:' run: | - git clone ${{ env.protocol }}${{ secrets.repo-token }}@/${{ inputs.repo-path }}" ds-default-repo + git clone $protocol${{ secrets.repo-token }}/${{ inputs.repo-path }}" ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 1964c43165eea65ae05d4fa6720b0d85452dae02 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:04:27 +0200 Subject: [PATCH 063/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index d2cac85..f57d065 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -19,6 +19,9 @@ on: repo-token: required: true + env: + PROTOCOL: 'https://oauth2:' + jobs: validate-instance: runs-on: ubuntu-latest @@ -45,10 +48,8 @@ jobs: run: cookiecutter . --no-input --config-file ${{ inputs.cookiecutter-profile }} - name: Remote checkout - env: - protocol: 'https://oauth2:' run: | - git clone $protocol${{ secrets.repo-token }}/${{ inputs.repo-path }}" ds-default-repo + git clone ${{ env.PROTOCOL }}${{ secrets.repo-token }}/${{ inputs.repo-path }}" ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 8922abe68e26b38519e158cd0b85204b92c8e9d5 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:05:27 +0200 Subject: [PATCH 064/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index f57d065..1da18eb 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -19,8 +19,8 @@ on: repo-token: required: true - env: - PROTOCOL: 'https://oauth2:' +env: + PROTOCOL: 'https://oauth2:' jobs: validate-instance: From 30aae0785915a828655656eeed12f170dffa7254 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:08:26 +0200 Subject: [PATCH 065/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 1da18eb..c828a89 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -49,7 +49,7 @@ jobs: - name: Remote checkout run: | - git clone ${{ env.PROTOCOL }}${{ secrets.repo-token }}/${{ inputs.repo-path }}" ds-default-repo + git clone ${{ env.PROTOCOL }}${{ secrets.repo-token }}${{ inputs.repo-path }}" ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 92aebde49eeff9dd5300c4439c90c61f62c7174f Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:10:04 +0200 Subject: [PATCH 066/101] escape --- .github/workflows/generate_default_project.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 11a2845..4b685c3 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -6,7 +6,7 @@ jobs: test-Github-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: github.com/karllu3/ds-lk-default.git + repo-path: @github.com/karllu3/ds-lk-default.git repo-user: karllu3 repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml @@ -16,7 +16,7 @@ jobs: test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: gitlab.com/lukasz.karlowski/ds-lk-default.git + repo-path: @gitlab.com/lukasz.karlowski/ds-lk-default.git repo-user: lukasz karlowski repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml From b045a4283e99a825ab1366c5ab0146bf12da7d64 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:11:02 +0200 Subject: [PATCH 067/101] escape --- .github/workflows/generate_default_project.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 4b685c3..00b6355 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -6,7 +6,7 @@ jobs: test-Github-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: @github.com/karllu3/ds-lk-default.git + repo-path: "@github.com/karllu3/ds-lk-default.git" repo-user: karllu3 repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml From f59c2ad1e023ba3291b35c74ea24e3fd64097e11 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:11:40 +0200 Subject: [PATCH 068/101] escape --- .github/workflows/generate_default_project.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 00b6355..ed0af75 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -16,7 +16,7 @@ jobs: test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: @gitlab.com/lukasz.karlowski/ds-lk-default.git + repo-path: "@gitlab.com/lukasz.karlowski/ds-lk-default.git" repo-user: lukasz karlowski repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml From d7a93123ff0e0deae764290963557b9d3e400dc7 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:21:09 +0200 Subject: [PATCH 069/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index c828a89..25448e0 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -20,7 +20,7 @@ on: required: true env: - PROTOCOL: 'https://oauth2:' + URL="https://oauth2:${{ secrets.repo-token }}@repo-path" jobs: validate-instance: @@ -49,7 +49,8 @@ jobs: - name: Remote checkout run: | - git clone ${{ env.PROTOCOL }}${{ secrets.repo-token }}${{ inputs.repo-path }}" ds-default-repo + echo ${{ env.URL }} + git clone ${{ env.URL }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From ce53065c60726f94b1d950cbdaf89f0fedf9c11b Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:21:53 +0200 Subject: [PATCH 070/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 25448e0..c43be39 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -20,7 +20,7 @@ on: required: true env: - URL="https://oauth2:${{ secrets.repo-token }}@repo-path" + URL: "https://oauth2:${{ secrets.repo-token }}@repo-path" jobs: validate-instance: From 9601c08b4e2c1929cda5cecafdabebb89a36b07b Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:23:53 +0200 Subject: [PATCH 071/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index c43be39..230675d 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -20,7 +20,7 @@ on: required: true env: - URL: "https://oauth2:${{ secrets.repo-token }}@repo-path" + URL: "https\://oauth2:${{ secrets.repo-token }}\@${{ repo-path }}" jobs: validate-instance: From 7734faaa2fbadec1c83d97942cea03847abec6de Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:25:26 +0200 Subject: [PATCH 072/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 230675d..d29a496 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -20,7 +20,7 @@ on: required: true env: - URL: "https\://oauth2:${{ secrets.repo-token }}\@${{ repo-path }}" + URL: "https\://oauth2:${{ secrets.repo-token }}\@${{ inputs.repo-path }}" jobs: validate-instance: From 85fcb7ca8a8076edd3b4c9089ac345d4a47b3673 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:26:43 +0200 Subject: [PATCH 073/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index d29a496..2dc60c2 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -20,7 +20,7 @@ on: required: true env: - URL: "https\://oauth2:${{ secrets.repo-token }}\@${{ inputs.repo-path }}" + URL: 'https://oauth2:${{ secrets.repo-token }}@${{ inputs.repo-path }' jobs: validate-instance: From b6bcbd8a31add8c85405c869b89bdf9042eb3fa3 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:30:04 +0200 Subject: [PATCH 074/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 2dc60c2..91faf6e 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -20,7 +20,7 @@ on: required: true env: - URL: 'https://oauth2:${{ secrets.repo-token }}@${{ inputs.repo-path }' + URL: 'https://oauth2:${{ secrets.repo-token }}@${{ inputs.repo-path }}' jobs: validate-instance: From 261c9992e01fa343f9561da5c7bfc0f2f76c2dd0 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:48:20 +0200 Subject: [PATCH 075/101] escape --- .github/workflows/generate_default_project.yaml | 8 ++++---- .github/workflows/generate_default_project_reusable.yaml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index ed0af75..3bc9904 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -6,19 +6,19 @@ jobs: test-Github-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: "@github.com/karllu3/ds-lk-default.git" + repo-path: "github.com/karllu3/ds-lk-default.git" repo-user: karllu3 repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml secrets: - repo-token: ${{ secrets.REPO_KEY_GITHUB }} + token: ${{ secrets.REPO_KEY_GITHUB }} test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: "@gitlab.com/lukasz.karlowski/ds-lk-default.git" + repo-path: "gitlab.com/lukasz.karlowski/ds-lk-default.git" repo-user: lukasz karlowski repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml secrets: - repo-token: ${{ secrets.REPO_KEY_GITLAB }} \ No newline at end of file + token: ${{ secrets.REPO_KEY_GITLAB }} diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 91faf6e..62d7f83 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -16,11 +16,11 @@ on: required: true type: string secrets: - repo-token: + token: required: true env: - URL: 'https://oauth2:${{ secrets.repo-token }}@${{ inputs.repo-path }}' + URL: 'https://oauth2:${{ secrets.token }}@${{ inputs.repo-path }}' jobs: validate-instance: @@ -50,7 +50,7 @@ jobs: - name: Remote checkout run: | echo ${{ env.URL }} - git clone ${{ env.URL }} ds-default-repo + git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@${{ inputs.repo-path }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 602b8b58ec6e49bc24bc64cec52779b0bee9426d Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:51:23 +0200 Subject: [PATCH 076/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 62d7f83..887f41d 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -50,7 +50,7 @@ jobs: - name: Remote checkout run: | echo ${{ env.URL }} - git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@${{ inputs.repo-path }} ds-default-repo + git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 5edfda7af18e1ecbf8485fb0256ebcc9a089a072 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:56:58 +0200 Subject: [PATCH 077/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 887f41d..48716c1 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -51,7 +51,7 @@ jobs: run: | echo ${{ env.URL }} git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo - cp -r ds-default/. ds-default-repo + cp -r ds-default-repo. ds-default-repo - name: Set safe directory run: | From 906fef4ddee5c620b5c7f83fcb5564fcdda8b33c Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 01:59:30 +0200 Subject: [PATCH 078/101] escape --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 48716c1..887f41d 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -51,7 +51,7 @@ jobs: run: | echo ${{ env.URL }} git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo - cp -r ds-default-repo. ds-default-repo + cp -r ds-default/. ds-default-repo - name: Set safe directory run: | From 8b1a1663878fe48e2f99a68badf4200746db185b Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:03:07 +0200 Subject: [PATCH 079/101] escape --- .../generate_default_project_reusable.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 887f41d..1bc448e 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -49,24 +49,24 @@ jobs: - name: Remote checkout run: | - echo ${{ env.URL }} - git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo - cp -r ds-default/. ds-default-repo + ls + git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds_default_repo + cp -r ds_default/. ds_default_repo - name: Set safe directory run: | git config --global --add safe.directory /__w/ds-template/ds-template - name: Prepare local git repo - working-directory: ./ds-default-repo + working-directory: ./ds_default_repo run: | git config --local user.email ${{ inputs.repo-email }} git config --local user.name ${{ inputs.repo-user }} - git checkout -b ds-default-check + git checkout -b ds_default-check git add . - name: Validate package build - working-directory: ./ds-default-repo + working-directory: ./ds_default_repo run: | python -m pip install . @@ -74,11 +74,11 @@ jobs: run: pip3 install pre-commit - name: Run pre-commit checks - working-directory: ./ds-default-repo + working-directory: ./ds_default_repo run: pre-commit run --all-files --show-diff-on-failure --color always - name: Push repo - working-directory: ./ds-default-repo + working-directory: ./ds_default_repo run: | git commit -m "Repo after creation" git push --set-upstream origin ds-default-check -f \ No newline at end of file From 5d041e9a9b5b6c972819c783424016f0a807e05f Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:08:32 +0200 Subject: [PATCH 080/101] escape --- .../generate_default_project_reusable.yaml | 14 +++++++------- cookiecutter_default_gl.yaml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 1bc448e..70a4591 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -50,23 +50,23 @@ jobs: - name: Remote checkout run: | ls - git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds_default_repo - cp -r ds_default/. ds_default_repo + git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo + cp -r ds-default/. ds-default-repo - name: Set safe directory run: | git config --global --add safe.directory /__w/ds-template/ds-template - name: Prepare local git repo - working-directory: ./ds_default_repo + working-directory: ./ds-default-repo run: | git config --local user.email ${{ inputs.repo-email }} git config --local user.name ${{ inputs.repo-user }} - git checkout -b ds_default-check + git checkout -b ds-default-check git add . - name: Validate package build - working-directory: ./ds_default_repo + working-directory: ./ds-default-repo run: | python -m pip install . @@ -74,11 +74,11 @@ jobs: run: pip3 install pre-commit - name: Run pre-commit checks - working-directory: ./ds_default_repo + working-directory: ./ds-default-repo run: pre-commit run --all-files --show-diff-on-failure --color always - name: Push repo - working-directory: ./ds_default_repo + working-directory: ./ds-default-repo run: | git commit -m "Repo after creation" git push --set-upstream origin ds-default-check -f \ No newline at end of file diff --git a/cookiecutter_default_gl.yaml b/cookiecutter_default_gl.yaml index ccb29d9..ef9cf54 100644 --- a/cookiecutter_default_gl.yaml +++ b/cookiecutter_default_gl.yaml @@ -1,5 +1,5 @@ default_context: client_name: "ds" - project_name: "ds_default" + project_name: "default" ci: "GitLab" jupytext": "No" From 8eab57c68c1443108fe6f35ab48dabfa328122fc Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:16:06 +0200 Subject: [PATCH 081/101] escape --- cookiecutter_default_gh.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookiecutter_default_gh.yaml b/cookiecutter_default_gh.yaml index 461d7ec..01463f8 100644 --- a/cookiecutter_default_gh.yaml +++ b/cookiecutter_default_gh.yaml @@ -1,5 +1,5 @@ default_context: client_name: "ds" - project_name: "ds_default" + project_name: "default" ci: "Github" jupytext": "No" From c85f320ae04f726e1570d5acc1e5ce70c4997f88 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:24:36 +0200 Subject: [PATCH 082/101] hardfix --- .github/workflows/generate_default_project_reusable.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 70a4591..8c9aed4 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -51,6 +51,7 @@ jobs: run: | ls git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo + git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git cp -r ds-default/. ds-default-repo - name: Set safe directory @@ -60,8 +61,8 @@ jobs: - name: Prepare local git repo working-directory: ./ds-default-repo run: | - git config --local user.email ${{ inputs.repo-email }} - git config --local user.name ${{ inputs.repo-user }} + git config --local user.email "lukasz.karlowski@deepsense.ai" + git config --local user.name "karllu3" git checkout -b ds-default-check git add . From b2836d86281293bf406c15c9ea3ce492bf8021c9 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:33:51 +0200 Subject: [PATCH 083/101] hardfix --- .github/workflows/generate_default_project.yaml | 6 ++---- .github/workflows/generate_default_project_reusable.yaml | 3 --- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 3bc9904..27bc5bc 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -10,8 +10,7 @@ jobs: repo-user: karllu3 repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: - token: ${{ secrets.REPO_KEY_GITHUB }} + secrets: inherit test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml @@ -20,5 +19,4 @@ jobs: repo-user: lukasz karlowski repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: - token: ${{ secrets.REPO_KEY_GITLAB }} + secrets: inherit diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 8c9aed4..2bf5295 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -19,9 +19,6 @@ on: token: required: true -env: - URL: 'https://oauth2:${{ secrets.token }}@${{ inputs.repo-path }}' - jobs: validate-instance: runs-on: ubuntu-latest From 166674ec0c588d322080427d75583b37f921a22a Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:41:04 +0200 Subject: [PATCH 084/101] hardfix --- .github/workflows/generate_default_project.yaml | 4 ++-- .github/workflows/generate_default_project_reusable.yaml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 27bc5bc..7b1326c 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -10,7 +10,7 @@ jobs: repo-user: karllu3 repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: inherit + secrets: inherit test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml @@ -19,4 +19,4 @@ jobs: repo-user: lukasz karlowski repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: inherit + secrets: inherit diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 2bf5295..de69a0c 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -46,7 +46,6 @@ jobs: - name: Remote checkout run: | - ls git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git cp -r ds-default/. ds-default-repo From 740e28fd36453703466479500f79c42a12939547 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:45:26 +0200 Subject: [PATCH 085/101] hardfix --- .github/workflows/generate_default_project.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 7b1326c..27bc5bc 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -10,7 +10,7 @@ jobs: repo-user: karllu3 repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: inherit + secrets: inherit test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml @@ -19,4 +19,4 @@ jobs: repo-user: lukasz karlowski repo-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: inherit + secrets: inherit From 4c2611705e8309212da1404c0995e2d7eeaf4ea0 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 02:46:14 +0200 Subject: [PATCH 086/101] hardfix --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index de69a0c..8d21335 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -16,7 +16,7 @@ on: required: true type: string secrets: - token: + REPO_KEY_GITHUB: required: true jobs: From 76d2dd191d8792d6a92f0d7263ce08c8cc5ca148 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 18:52:49 +0200 Subject: [PATCH 087/101] bring back envs --- .github/workflows/generate_default_project.yaml | 4 ++-- .../workflows/generate_default_project_reusable.yaml | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 27bc5bc..848f72f 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -8,7 +8,7 @@ jobs: with: repo-path: "github.com/karllu3/ds-lk-default.git" repo-user: karllu3 - repo-email: lukasz.karlowski@deepsense.ai + repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml secrets: inherit @@ -17,6 +17,6 @@ jobs: with: repo-path: "gitlab.com/lukasz.karlowski/ds-lk-default.git" repo-user: lukasz karlowski - repo-email: lukasz.karlowski@deepsense.ai + repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml secrets: inherit diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 8d21335..4a92ea8 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -9,7 +9,7 @@ on: repo-user: required: true type: string - repo-email: + repo-user-email: required: true type: string cookiecutter-profile: @@ -18,6 +18,8 @@ on: secrets: REPO_KEY_GITHUB: required: true + REPO_KEY_GITLAB: + required: true jobs: validate-instance: @@ -46,8 +48,7 @@ jobs: - name: Remote checkout run: | - git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git ds-default-repo - git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@github.com/karllu3/ds-lk-default.git + git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@${{ inputs.repo_path }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory @@ -57,8 +58,8 @@ jobs: - name: Prepare local git repo working-directory: ./ds-default-repo run: | - git config --local user.email "lukasz.karlowski@deepsense.ai" - git config --local user.name "karllu3" + git config --local user.email "${{ inputs.repo-user }}" + git config --local user.name "${{ inputs.repo-user-email }}" git checkout -b ds-default-check git add . From 4ec6f8d4e43484c7548e15d229ee1c0b9bcb7eb1 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:00:30 +0200 Subject: [PATCH 088/101] reusable --- .github/workflows/generate_default_project.yaml | 4 ++-- .github/workflows/generate_default_project_reusable.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 848f72f..74f57c3 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -6,7 +6,7 @@ jobs: test-Github-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: "github.com/karllu3/ds-lk-default.git" + repo-path: @github.com/karllu3/ds-lk-default.git repo-user: karllu3 repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml @@ -15,7 +15,7 @@ jobs: test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: "gitlab.com/lukasz.karlowski/ds-lk-default.git" + repo-path: @gitlab.com/lukasz.karlowski/ds-lk-default.git repo-user: lukasz karlowski repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 4a92ea8..146a46c 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -48,7 +48,7 @@ jobs: - name: Remote checkout run: | - git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@${{ inputs.repo_path }} ds-default-repo + git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}${{ inputs.repo_path }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From f49c5d9ab934646beb7e78630a6220902d458fcf Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:04:34 +0200 Subject: [PATCH 089/101] escape @ --- .github/workflows/generate_default_project.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 74f57c3..c56e565 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -6,7 +6,7 @@ jobs: test-Github-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: @github.com/karllu3/ds-lk-default.git + repo-path: \@github.com/karllu3/ds-lk-default.git repo-user: karllu3 repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml @@ -15,7 +15,7 @@ jobs: test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: @gitlab.com/lukasz.karlowski/ds-lk-default.git + repo-path: \@gitlab.com/lukasz.karlowski/ds-lk-default.git repo-user: lukasz karlowski repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml From 2d82556c5c1865660128e85b3bba5533d244e3a3 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:13:16 +0200 Subject: [PATCH 090/101] workflow reusable --- .github/workflows/generate_default_project_reusable.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 146a46c..24af90c 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -48,7 +48,9 @@ jobs: - name: Remote checkout run: | - git clone https://oauth2:${{ secrets.REPO_KEY_GITHUB }}${{ inputs.repo_path }} ds-default-repo + echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}${{ inputs.repo_path }}')" >> $GITHUB_ENV + echo $REMOTE_REPO_REF + git clone $REMOTE_REPO_REF ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From 0f72f9d28bb0b91a686963c39a1f37ade864adfe Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:17:46 +0200 Subject: [PATCH 091/101] repo workflow --- .github/workflows/generate_default_project_reusable.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 24af90c..c296cb1 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -46,11 +46,16 @@ jobs: - name: Create Github project instance run: cookiecutter . --no-input --config-file ${{ inputs.cookiecutter-profile }} + - name: Prepare remote link + run: | + echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}${{ inputs.repo_path }}')" >> $GITHUB_ENV + echo "remote repo $REMOTE_REPO_REF" + - name: Remote checkout run: | echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}${{ inputs.repo_path }}')" >> $GITHUB_ENV - echo $REMOTE_REPO_REF - git clone $REMOTE_REPO_REF ds-default-repo + echo ${{ env.REMOTE_REPO_REF }} + git clone ${{ env.REMOTE_REPO_REF }} ds-default-repo cp -r ds-default/. ds-default-repo - name: Set safe directory From c1c7c56a141351d9415dfb370778fe484aae775a Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:30:49 +0200 Subject: [PATCH 092/101] repo --- .github/workflows/generate_default_project.yaml | 4 ++-- .github/workflows/generate_default_project_reusable.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index c56e565..537712c 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -6,7 +6,7 @@ jobs: test-Github-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: \@github.com/karllu3/ds-lk-default.git + repo-path: github.com/karllu3/ds-lk-default.git repo-user: karllu3 repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml @@ -15,7 +15,7 @@ jobs: test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: \@gitlab.com/lukasz.karlowski/ds-lk-default.git + repo-path: gitlab.com/lukasz.karlowski/ds-lk-default.git repo-user: lukasz karlowski repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index c296cb1..fff82f6 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -48,12 +48,12 @@ jobs: - name: Prepare remote link run: | - echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}${{ inputs.repo_path }}')" >> $GITHUB_ENV - echo "remote repo $REMOTE_REPO_REF" + echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }}')" >> $GITHUB_ENV + echo "remote repo ${{ env.REMOTE_REPO_REF }}" - name: Remote checkout run: | - echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}${{ inputs.repo_path }}')" >> $GITHUB_ENV + echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }}')" >> $GITHUB_ENV echo ${{ env.REMOTE_REPO_REF }} git clone ${{ env.REMOTE_REPO_REF }} ds-default-repo cp -r ds-default/. ds-default-repo From 55855f2af6b2e68d38da185155dd97a086a5bd77 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:34:58 +0200 Subject: [PATCH 093/101] set env --- .github/workflows/generate_default_project_reusable.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index fff82f6..151cf75 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -21,6 +21,9 @@ on: REPO_KEY_GITLAB: required: true + env: + REMOTE_REPO_REF: https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }} + jobs: validate-instance: runs-on: ubuntu-latest @@ -48,13 +51,10 @@ jobs: - name: Prepare remote link run: | - echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }}')" >> $GITHUB_ENV echo "remote repo ${{ env.REMOTE_REPO_REF }}" - name: Remote checkout run: | - echo "REMOTE_REPO_REF=$(echo 'https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }}')" >> $GITHUB_ENV - echo ${{ env.REMOTE_REPO_REF }} git clone ${{ env.REMOTE_REPO_REF }} ds-default-repo cp -r ds-default/. ds-default-repo From a842d70ece50a6fe93b5f631d3140e965861adef Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:36:17 +0200 Subject: [PATCH 094/101] set env --- .github/workflows/generate_default_project_reusable.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 151cf75..b69a150 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -21,8 +21,8 @@ on: REPO_KEY_GITLAB: required: true - env: - REMOTE_REPO_REF: https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }} +env: + REMOTE_REPO_REF: https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }} jobs: validate-instance: From 9e83e965530240844b275e4f2f296df72bd169b3 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:38:44 +0200 Subject: [PATCH 095/101] set env --- .github/workflows/generate_default_project_reusable.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index b69a150..5edf775 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -22,7 +22,7 @@ on: required: true env: - REMOTE_REPO_REF: https://oauth2:${{ secrets.REPO_KEY_GITHUB }}\@${{ inputs.repo_path }} + REMOTE_REPO_REF: https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@${{ inputs.repo-path }} jobs: validate-instance: From 9393bbdc49fd69698968befd7533c051aed54b63 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Sat, 27 Jul 2024 19:47:49 +0200 Subject: [PATCH 096/101] secret pass --- .github/workflows/generate_default_project.yaml | 6 ++++-- .github/workflows/generate_default_project_reusable.yaml | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 537712c..20d761b 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -10,7 +10,8 @@ jobs: repo-user: karllu3 repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: inherit + secrets: + REPO_TOKEN: ${{ secrets.REPO_KEY_GITHUB }} test-GitLab-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml @@ -19,4 +20,5 @@ jobs: repo-user: lukasz karlowski repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml - secrets: inherit + secrets: + REPO_TOKEN: ${{ secrets.REPO_KEY_GITLAB }} diff --git a/.github/workflows/generate_default_project_reusable.yaml b/.github/workflows/generate_default_project_reusable.yaml index 5edf775..8eb8f60 100644 --- a/.github/workflows/generate_default_project_reusable.yaml +++ b/.github/workflows/generate_default_project_reusable.yaml @@ -16,13 +16,11 @@ on: required: true type: string secrets: - REPO_KEY_GITHUB: - required: true - REPO_KEY_GITLAB: + REPO_TOKEN: required: true env: - REMOTE_REPO_REF: https://oauth2:${{ secrets.REPO_KEY_GITHUB }}@${{ inputs.repo-path }} + REMOTE_REPO_REF: https://oauth2:${{ secrets.REPO_TOKEN }}@${{ inputs.repo-path }} jobs: validate-instance: From 287436a2b7714cf12137b3cd37c51e43221374a6 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Mon, 29 Jul 2024 11:17:44 +0200 Subject: [PATCH 097/101] gitlab tag --- {{ cookiecutter.repo_name }}/.gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml index 1c11b4a..1964f56 100644 --- a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml +++ b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml @@ -1,6 +1,7 @@ default: tags: - all-ds + - gitlab-org variables: PYTHON_DOCKER_IMAGE: python:3.11 From 4b801e0a66c49a0d88aa51ae71f34f5e5c0ad0c2 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Mon, 29 Jul 2024 11:22:28 +0200 Subject: [PATCH 098/101] gh/gh --- .github/workflows/generate_default_project.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate_default_project.yaml b/.github/workflows/generate_default_project.yaml index 20d761b..570f13c 100644 --- a/.github/workflows/generate_default_project.yaml +++ b/.github/workflows/generate_default_project.yaml @@ -6,7 +6,7 @@ jobs: test-Github-default-instance: uses: ./.github/workflows/generate_default_project_reusable.yaml with: - repo-path: github.com/karllu3/ds-lk-default.git + repo-path: github.com/karllu3/ds-lk-default.git repo-user: karllu3 repo-user-email: lukasz.karlowski@deepsense.ai cookiecutter-profile: cookiecutter_default_gh.yaml @@ -19,6 +19,6 @@ jobs: repo-path: gitlab.com/lukasz.karlowski/ds-lk-default.git repo-user: lukasz karlowski repo-user-email: lukasz.karlowski@deepsense.ai - cookiecutter-profile: cookiecutter_default_gh.yaml + cookiecutter-profile: cookiecutter_default_gl.yaml secrets: REPO_TOKEN: ${{ secrets.REPO_KEY_GITLAB }} From c16c6dc855c83104b9abdf9eba713e67f46e3109 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Mon, 29 Jul 2024 11:26:50 +0200 Subject: [PATCH 099/101] gh/gl --- {{ cookiecutter.repo_name }}/.gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml index 1964f56..a6f1f77 100644 --- a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml +++ b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml @@ -1,6 +1,5 @@ default: tags: - - all-ds - gitlab-org variables: From 7687a4f69461ed539314b09f80654277dd150567 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Mon, 29 Jul 2024 11:29:52 +0200 Subject: [PATCH 100/101] own runner --- {{ cookiecutter.repo_name }}/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml index a6f1f77..1c11b4a 100644 --- a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml +++ b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml @@ -1,6 +1,6 @@ default: tags: - - gitlab-org + - all-ds variables: PYTHON_DOCKER_IMAGE: python:3.11 From 08d696b2fc7936ad68044a93b0b9cba8acc1d0b4 Mon Sep 17 00:00:00 2001 From: Lukasz Karlowski Date: Tue, 30 Jul 2024 09:32:01 +0200 Subject: [PATCH 101/101] gitlab public tag --- {{ cookiecutter.repo_name }}/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml index 1c11b4a..417aaa1 100644 --- a/{{ cookiecutter.repo_name }}/.gitlab-ci.yml +++ b/{{ cookiecutter.repo_name }}/.gitlab-ci.yml @@ -1,6 +1,6 @@ default: tags: - - all-ds + - gitlab-org-docker variables: PYTHON_DOCKER_IMAGE: python:3.11