diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4badf4ceeba996c80b83b3e0cd893461033c483b..c8ea4c9f500828bcdf806d0c8bca3b2997c042e2 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,12 +7,12 @@ repos:
       - id: isort
         args: [--settings-path, "pyproject.toml"]
   - repo: https://github.com/psf/black
-    rev: 22.3.0
+    rev: 22.10.0
     hooks:
       - id: black
         exclude: bob/devtools/templates/setup.py
   - repo: https://gitlab.com/pycqa/flake8
-    rev: 4.0.1
+    rev: 3.9.2
     hooks:
       - id: flake8
         exclude: |
@@ -21,7 +21,7 @@ repos:
                   deps/bob-devel/run_test.py
               )$
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v4.1.0
+    rev: v4.3.0
     hooks:
       - id: check-ast
         exclude: bob/devtools/templates/setup.py
@@ -33,4 +33,5 @@ repos:
       - id: check-added-large-files
         exclude: bob/devtools/templates/setup.py
       - id: check-yaml
+        args: ['--unsafe']
         exclude: .*/meta.*.yaml
diff --git a/bob/devtools/data/gitlab-ci/single-package.yaml b/bob/devtools/data/gitlab-ci/single-package.yaml
index b0396e42bf964eb78148f8c8298ce127a6162272..329977c0239bba1c1f0ee6987e31f1058206ec2e 100644
--- a/bob/devtools/data/gitlab-ci/single-package.yaml
+++ b/bob/devtools/data/gitlab-ci/single-package.yaml
@@ -25,9 +25,6 @@ stages:
     - source ${CONDA_ROOT}/etc/profile.d/conda.sh
     # for conda inspect during builds (on macos)
     - conda activate base
-    - echo "CI_RUNNER_TAGS = '${CI_RUNNER_TAGS}'"
-    - if [[ "$CI_RUNNER_TAGS" =~ ^.*bob.*docker\|docker.*bob.*$ ]]; then echo "YES!!"; git config --global --add safe.directory ${CI_PROJECT_DIR}; fi
-    - bdt ci check -vv
   cache:
     paths:
       - miniconda.sh
@@ -61,6 +58,10 @@ stages:
   # make sure we use the same image as conda-forge:
   # https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml
   image: quay.io/condaforge/linux-anvil-cos7-x86_64
+  before_script:
+    - !reference [.bootstrap, before_script]
+    - git config --global --add safe.directory ${CI_PROJECT_DIR}
+    - bdt ci check -vv
   artifacts:
     paths:
       - ${CONDA_ROOT}/conda-bld/linux-64/*.conda
@@ -76,6 +77,9 @@ stages:
     - bob
     - macos
     - intel
+  before_script:
+    - !reference [.bootstrap, before_script]
+    - bdt ci check -vv
   artifacts:
     paths:
       - ${CONDA_ROOT}/conda-bld/osx-64/*.conda
@@ -88,6 +92,9 @@ stages:
     - bob
     - macos
     - arm
+  before_script:
+    - !reference [.bootstrap, before_script]
+    - bdt ci check -vv
   artifacts:
     paths:
       - ${CONDA_ROOT}/conda-bld/osx-arm64/*.conda