This repository has been archived on 2026-03-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ci-templates/Pre-Commit-Go.gitlab-ci.yml
T
argoyle 4dd87a0961 ci: update pre-commit configuration for GitLab CI
Add GOPRIVATE environment variable for private repos and 
create a .netrc file in the before_script to enable 
authentication with GitLab. These changes ensure that 
private repositories can be accessed during the CI 
pipeline, improving the build process.
2024-11-13 12:41:01 +01:00

17 lines
492 B
YAML

run-pre-commit:
stage: .pre
image: unbound/pre-commit@sha256:596abf501d5ac878534b76f19d19ec5c952f1f362ad92d611172072ef5d483d5
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
GOPRIVATE: gitlab.com/unboundsoftware
cache:
- key:
files:
- .pre-commit-config.yaml
paths:
- ${PRE_COMMIT_HOME}
before_script:
- echo -e "machine gitlab.com\nlogin gitlab-ci-token\npassword ${CI_JOB_TOKEN}" > ~/.netrc
script:
- pre-commit run --all-files