feat: setup script to sync repos

Related to #50
This commit is contained in:
silver 2023-12-27 21:16:30 +00:00
parent 54529e0d21
commit 07601f708c
5 changed files with 60 additions and 2 deletions

View file

@ -1,7 +1,7 @@
# borrowed from https://gitlab.com/nix17/nixos-config/-/blob/main/.gitlab-ci.yml
stages:
- flake
- misc
- test
- deploy
- deploy_gitlab
@ -11,7 +11,7 @@ stages:
# $PACKAGE_NAME = name of the flake that needs to be updated
# $UPDATE_FLAKE = flag to update the flake
update:
stage: flake
stage: misc
tags:
- nix
# from https://forum.gitlab.com/t/git-push-from-inside-a-gitlab-runner/30554/5
@ -40,6 +40,17 @@ update:
variables:
- $UPDATE_FLAKE == "yes"
sync_repos:
stage: misc
image: registry.gitlab.com/gitlab-ci-utils/curl-jq:2.0.0
script:
- cd sync
- chmod +x ./sync.sh
- ./sync.sh
rules:
- changes:
- sync/repos.csv
.scripts_base: &scripts_base
# load nix environment
- git pull origin $CI_COMMIT_REF_NAME