  ## DO NOT EDIT THIS FILE MANUALLY, IT IS GENERATED BY NIX
  image: docker-registry.schukai.com:443/nixos-ci-devenv:latest

  #services:
  #  - docker:dind


  variables:
    NIXOS_VERSION: "23.11"
    NIXPKGS_ALLOW_UNFREE: "1"
    NIXPKGS_ALLOW_INSECURE: "1"
    #DOCKER_DRIVER: overlay2


  stages:
    - tag
    - release

  # if you want to debug the ci pipeline, uncomment the following lines
  #debug: 
  #  tags:
  #    - nixos
  #  stage: tag  
  #  script:
  #    - export

  tag-it:
    tags:
      - nixos
    stage: tag
    script:
      - devenv shell tag-version

    rules:
      - if: '$CI_COMMIT_TAG'
        when: never
      - if: '$CI_COMMIT_TAG_MESSAGE =~ /DO_RELEASE/'
        when: never
      - if: '$CI_COMMIT_MESSAGE =~ /Bump version/'
        when: never
      - when: on_success

  release:
    tags:
      - nixos
    stage: release
    rules:
      - if: '$CI_COMMIT_TAG_MESSAGE =~ /DO_RELEASE/' 
        when: on_success
      - when: never
    variables:
      # Disable shallow cloning so that goreleaser  can diff between tags to
      GIT_DEPTH: 0
    script:
      - devenv shell deploy-app
      #- cd source; goreleaser release --clean
## DO NOT EDIT THIS FILE MANUALLY, IT IS GENERATED BY NIX
