ci: update to teh hash from teh flake bump

This commit is contained in:
Brendan Golden 2023-07-27 20:06:27 +00:00
parent dae9549064
commit 945b43dddb

View file

@ -5,6 +5,9 @@ stages:
- test
- deploy
variables:
FLAKE_COMMIT=""
# Update the flake for any changes upstream
# Passed in from upstream
# $PACKAGE_NAME = name of the flake that needs to be updated
@ -31,6 +34,8 @@ update:
# we have a custom domain
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc/skynet/nixos.git
- git push origin HEAD:$CI_COMMIT_REF_NAME
# update teh hash for further along in the pipeline
- $FLAKE_COMMIT=$(git rev-parse HEAD)
only:
refs:
- main
@ -41,6 +46,9 @@ build:
stage: test
before_script:
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
# use the
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc/skynet/nixos.git
- git pull origin $FLAKE_COMMIT
script:
- nix --experimental-features 'nix-command flakes' run nixpkgs#colmena -- build
@ -55,6 +63,8 @@ deploy:
- chmod 700 ~/.ssh
# load nix environment
- . "$HOME/.nix-profile/etc/profile.d/nix.sh"
- git remote rm origin && git remote add origin ssh://git@gitlab.skynet.ie:2222/compsoc/skynet/nixos.git
- git pull origin $FLAKE_COMMIT
script:
# dns is always deployed first
- nix --experimental-features 'nix-command flakes' run nixpkgs#colmena -- apply --on @active-dns