move code to a separate script to avoid docker messing up

it seems that using $ and | is not being friendly to docker
1 job for !960 with clang-format-gitlab-ci in 1 minute and 6 seconds (queued for 6 seconds)
detached
Status Name Job ID Coverage
  Build
failed clang_format #118471

00:01:06

 
Name Stage Failure
failed
clang_format Build
$ update-ca-certificates
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
$ ./.gitlab-ci.script
/bin/bash: line 137: ./.gitlab-ci.script: Permission denied
Cleaning up file based variables
ERROR: Job failed: exit code 1