About

This is a module for Devshell that help you write your github actions yaml in Nix

If you don't know what is all about, see Devshell Files Introduction.

tl;dr: It make our config files reusable and modular

Installation

Setup configuration

Configuring new projects:

nix flake new -t github:cruel-intentions/gh-actions my-project
cd my-project
git init
nix develop --build
git add .

Configuring existing projects:

nix flake new -t github:cruel-intentions/gh-actions ./
nix develop --build
git add flake.nix flake.lock project.nix

Configuring existing Nix projects:

See Devshell-files docs

Examples

Basic

The most basic example is used by this project to tag it

# project.nix
{
  packages = ["convco"];
  # actions are disable by default, enable it (required)
  gh-actions.tag-me.enable = true;
  # there are 5 optional configurable steps
  # pre-build, build, test, deploy, post-deploy
  # only defined steps goes to yaml file
  gh-actions.tag-me.build = ''
    # tag this project on push to master
    # this is a bash script

    CURR=`convco  version`
    NEXT=`convco  version --bump`
    MAJOR=`convco version --bump --major`
    MINOR=`convco version --bump --minor`
    PATCH=`convco version --bump --patch`

    LOGS=`git log v$CURR..HEAD --format=oneline|cut -d' ' -f2`
    if echo $CURR|grep -q $NEXT; then
      echo "no reason to update tag" $CURR 
      git log v$CURR..HEAD --format=oneline
      exit 0
    fi

    NEXT=`echo $LOGS | grep -q "feat" && echo $MINOR || echo $NEXT`
    NEXT=`echo $LOGS | grep -q "!:"   && echo $MAJOR || echo $NEXT`

    git tag v$NEXT

    git push --tag
  '';
  # Configure github cache
  gh-actions.tag-me.gha-cache.name = "Cache";
}

It generate our .github/workflows/tag-me.yaml (click to expand)
# .github/workflows/tag-me.yaml
jobs:
  tag-me:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - id: cache
        name: Cache
        uses: actions/cache@v4
        with:
          key: nix-${{ runner.os }}-${{ hashFiles('flake.lock') }}
          path: ~/.cache/nix
      - uses: cachix/install-nix-action@v31
        with:
          extra_nix_config: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
          nix_path: channel:nixos-24.05
      - name: Build
        run: nix develop --command gh-actions-tag-me-build
"on":
  push:
    branches:
      - master

We should commit this yaml file because github can only read commited yaml files.

Complex

This is a more complex example

# examples/nodejs.nix
{
  packages = ["awscli" "convco" "nodejs"];
  # 'ci-cd' is the name of genereted file
  # but we are free to change it
  # In previous example we named as 'tag-it'
  gh-actions.ci-cd.enable           = true;
  gh-actions.ci-cd.on.push.branches = ["master" "staging"]; # only run it on master and staging
  gh-actions.ci-cd.on.push.paths    = ["src/**/*.js"];      # only run it if JS change
  gh-actions.ci-cd.pre-build        = "npm install";        # install dependencies
  gh-actions.ci-cd.build            = "npm run build";      # build our site
  gh-actions.ci-cd.deploy           = ''
    push-to-s3 my-staging-s3-bucket staging
    push-to-s3 my-production-s3-bucket master
  '';                                                       # deploy you static site
  # my needs AWS S3 credentials
  gh-actions.ci-cd.env.deploy.AWS_ACCESS_KEY_ID     = "\${{ secrets.AWS_ACCESS_KEY_ID     }}";
  gh-actions.ci-cd.env.deploy.AWS_SECRET_ACCESS_KEY = "\${{ secrets.AWS_SECRET_ACCESS_KEY }}";
  gh-actions.ci-cd.env.deploy.AWS_DEFAULT_REGION    = "\${{ secrets.AWS_DEFAULT_REGION    }}";
  # create tag after deploy if master branch
  gh-actions.ci-cd.post-deploy = ''
    echo $GITHUB_REF | grep -q "master" || exit 0
    git tag v$(convco version --bump)
    git push --tag
  '';
  # We could also configure Cachix
  # https://www.cachix.org/
  gh-actions.ci-cd.cache.name = "yourCacheName";
  # git hub secret with cache token
  # gh-actions.ci-cd.cache.token-name = "CACHIX_AUTH_TOKEN"  # default value
  # git hub secret with cache signing key
  # gh-actions.ci-cd.cache.key-name   = null                 # default value
  # nodejs needs to be available
  # But it could be ruby, python, rust...
  # See more 80.000 packages at https://search.nixos.org/packages
  files.alias.push-to-s3 = ''
    # push to s3 bucket $1 if $2 match branch name
    echo $GITHUB_REF | grep -q $2 || exit 0
    echo deploy to $1
    aws s3 sync build s3://$1 --acl public-read --delete
  '';
}


gh-actions

Configure your github actions CI/CD

type

attribute set of (submodule)

default

{
  gh-actions = { };
}

gh-actions.<name>.enable

Whether to enable Github Actions CI-CD.

type

boolean

example

{
  gh-actions.<name>.enable = true;
}

default

{
  gh-actions.<name>.enable = false;
}

gh-actions.<name>.build

Command to run as build step

type

null or non-empty string

example

{
  gh-actions.<name>.build = "npm run build";
}

default

{
  gh-actions.<name>.build = null;
}

gh-actions.<name>.cache

CACHIX binary cache configuration

type

null or (submodule)

example

{
  gh-actions.<name>.cache = {
    key-name = "CACHIX_SIGNING_KEY";
    name = "MyCACHIXCacheName";
  };
}

default

{
  gh-actions.<name>.cache = null;
}

gh-actions.<name>.cache.key-name

Name of GH Secret with CACHIX SIGNING KEY

type

null or non-empty string

example

{
  gh-actions.<name>.cache.key-name = "CACHIX_SIGNING_KEY";
}

default

{
  gh-actions.<name>.cache.key-name = null;
}

gh-actions.<name>.cache.name

Name of your cache in CACHIX

type

non-empty string

example

{
  gh-actions.<name>.cache.name = "MyCACHIXCacheName";
}

default

{
  gh-actions.<name>.cache.name = null;
}

gh-actions.<name>.cache.token-name

Name of GH Secret with CACHIX AUTH TOKEN

type

null or non-empty string

example

{
  gh-actions.<name>.cache.token-name = "CACHIX_AUTH_TOKEN";
}

default

{
  gh-actions.<name>.cache.token-name = "CACHIX_AUTH_TOKEN";
}

gh-actions.<name>.deploy

Command to run as deploy step

type

null or non-empty string

example

{
  gh-actions.<name>.deploy = "aws s3 sync ./build s3://my-bucket";
}

default

{
  gh-actions.<name>.deploy = null;
}

gh-actions.<name>.env

env vars for steps

type

submodule

default

{
  gh-actions.<name>.env = { };
}

gh-actions.<name>.env.build

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.build = {
    GIPHY_TOKEN = "\${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.build = { };
}

gh-actions.<name>.env.deploy

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.deploy = {
    GIPHY_TOKEN = "\${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.deploy = { };
}

gh-actions.<name>.env.post-deploy

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.post-deploy = {
    GIPHY_TOKEN = "\${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.post-deploy = { };
}

gh-actions.<name>.env.pre-build

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.pre-build = {
    GIPHY_TOKEN = "\${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.pre-build = { };
}

gh-actions.<name>.env.test

Env variable used by steps

type

attribute set of string

example

{
  gh-actions.<name>.env.test = {
    GIPHY_TOKEN = "\${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.env.test = { };
}

gh-actions.<name>.gha-cache

GH Action Cache configuration By default it caches only ~/.cache/nix

type

null or (submodule)

example

{
  gh-actions.<name>.gha-cache = {
    name = "My cache";
  };
}

default

{
  gh-actions.<name>.gha-cache = null;
}

gh-actions.<name>.gha-cache.id

Id to be used in action

type

non-empty string

example

{
  gh-actions.<name>.gha-cache.id = "my-cache";
}

default

{
  gh-actions.<name>.gha-cache.id = "cache";
}

gh-actions.<name>.gha-cache.key

Key to used in this cache

type

non-empty string

example

{
  gh-actions.<name>.gha-cache.key = "nix-\${{ runner.os }}-\${{ hashFiles('flake.lock') }}";
}

default

{
  gh-actions.<name>.gha-cache.key = "nix-\${{ runner.os }}-\${{ hashFiles('flake.lock') }}";
}

gh-actions.<name>.gha-cache.name

Name to be used in this action

type

non-empty string

example

{
  gh-actions.<name>.gha-cache.name = "My Cache";
}

default

{
  gh-actions.<name>.gha-cache.name = "Cache";
}

gh-actions.<name>.gha-cache.paths

Other paths to cache

type

list of non-empty string

example

{
  gh-actions.<name>.gha-cache.paths = [
    "~/.cache/nim"
  ];
}

default

{
  gh-actions.<name>.gha-cache.paths = [
    "~/.cache/nix"
  ];
}

gh-actions.<name>.gha-cache.uses

Cache version, default is actions/cache@4

type

non-empty string

example

{
  gh-actions.<name>.gha-cache.uses = "actions/cache@v4";
}

default

{
  gh-actions.<name>.gha-cache.uses = "actions/cache@v4";
}

gh-actions.<name>.on

When this build should be triggered

type

attribute set of anything

example

{
  gh-actions.<name>.on = {
    push = {
      branches = [
        "master"
      ];
    };
  };
}

default

{
  gh-actions.<name>.on = {
    push = {
      branches = [
        "master"
      ];
    };
  };
}

gh-actions.<name>.post-deploy

Command that run after deploy

type

null or non-empty string

example

{
  gh-actions.<name>.post-deploy = "echo Im done";
}

default

{
  gh-actions.<name>.post-deploy = null;
}

gh-actions.<name>.pre-build

Command to run before build

type

null or non-empty string

example

{
  gh-actions.<name>.pre-build = "npm i";
}

default

{
  gh-actions.<name>.pre-build = null;
}

gh-actions.<name>.ssh

https://github.com/marketplace/actions/install-ssh-key Config for ssh installation There are two reasons to set it

  1. our deploy runs in ssh
  2. we have some private git repository

In this last case we should add your public key to some user with repository access (in github) or to our private server.

type

null or (attribute set of string)

example

{
  gh-actions.<name>.ssh = {
    key = "\${{ secret.GH_ACTIONS_SSH_KEY }}";
  };
}

default

{
  gh-actions.<name>.ssh = null;
}

gh-actions.<name>.ssh-secret-name

Name of GH Secret with PRIVATE SSH KEY for more advanced usage try ssh option

type

null or non-empty string

example

{
  gh-actions.<name>.ssh-secret-name = "GH_ACTIONS_SSH_KEY";
}

default

{
  gh-actions.<name>.ssh-secret-name = null;
}

gh-actions.<name>.test

Command to run as test step

type

null or non-empty string

example

{
  gh-actions.<name>.test = "npm test";
}

default

{
  gh-actions.<name>.test = null;
}

gh-form

Disable auto rebase (enabled by default) see github documentations

type

attribute set of (submodule)

example

{
  gh-form = {
    testing = {
      assignees = [
        "hugosenari"
      ];
      checkboxes = {
        some-check = {
          description = "test gh forms checkboxes";
          label = "some check";
          options = [
            "some option"
          ];
          required = true;
          required-options = [
            "some required option"
          ];
        };
      };
      description = "Testing GH Form";
      dropdown = {
        some-dropdown = {
          description = "test gh forms dropdown";
          label = "some dropdowns";
          multiple = true;
          options = [
            "some other option"
          ];
          required = true;
        };
      };
      input = {
        some-input = {
          description = "to test gh forms inputs";
          label = "some input";
          placeholder = "Hold!!!";
          required = true;
          value = "Valuable";
        };
      };
      labels = [
        "testing"
      ];
      markdown = {
        some-markdown = {
          value = ''
            # Im a markdown
            
            I will will be displayed at form page
            I'm not intented to be filled by user, only displayed to user
          '';
        };
      };
      text = {
        some-text = {
          description = "to test gh forms texts";
          label = "some text";
          placeholder = "some bash!!!";
          render = "bash";
          required = true;
          value = ''
            echo "Hello World"
          '';
        };
      };
      title = "testing: ";
    };
  };
}

default

{
  gh-form = { };
}

gh-form.<name>.assignees

List of assignees to this kind of issue

see github documentations

type

list of non-empty string

example

{
  gh-form.<name>.assignees = [
    "hugosenari"
  ];
}

default

{
  gh-form.<name>.assignees = [ ];
}

gh-form.<name>.checkboxes

Github forms body dropdown fields

gh-forms.<file-name>.checkboxes.<field-id>.label = "<label>"; gh-forms.<file-name>.checkboxes.<field-id>.description = "<description>";

See github documentations

type

attribute set of (submodule)

example

{
  gh-form.<name>.checkboxes = {
    agreement = {
      description = "Check to confirm";
      label = "Are you sure?";
    };
  };
}

default

{
  gh-form.<name>.checkboxes = { };
}

gh-form.<name>.checkboxes.<name>.description

Description of checkboxes input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.checkboxes.<name>.description = "Confirm this checking";
}

default

{
  gh-form.<name>.checkboxes.<name>.description = null;
}

gh-form.<name>.checkboxes.<name>.label

Label of checkboxes input

See github documentations

type

non-empty string

example

{
  gh-form.<name>.checkboxes.<name>.label = "Are you sure?";
}

gh-form.<name>.checkboxes.<name>.options

Values that can be checked

See github documentations

type

list of non-empty string

example

{
  gh-form.<name>.checkboxes.<name>.options = [
    "spam me"
  ];
}

default

{
  gh-form.<name>.checkboxes.<name>.options = [ ];
}

gh-form.<name>.checkboxes.<name>.required

If this text input is required

See github documentations

type

boolean

example

{
  gh-form.<name>.checkboxes.<name>.required = true;
}

default

{
  gh-form.<name>.checkboxes.<name>.required = false;
}

gh-form.<name>.checkboxes.<name>.required-options

Values that can be checked that need to be checked

See github documentations

type

list of non-empty string

example

{
  gh-form.<name>.checkboxes.<name>.required-options = [
    "I'm sure"
  ];
}

default

{
  gh-form.<name>.checkboxes.<name>.required-options = [ ];
}

gh-form.<name>.description

A description for the issue form template

see github documentations

type

non-empty string

example

{
  gh-form.<name>.description = "File a bug report";
}

gh-form.<name>.dropdown

Github forms body dropdown fields

gh-forms.<file-name>.dropdown.<field-id>.label = "<label>"; gh-forms.<file-name>.dropdown.<field-id>.description = "<description>";

See github documentations

type

attribute set of (submodule)

example

{
  gh-form.<name>.dropdown = {
    greeting-type = {
      description = "Types of greeting message";
      label = "Greeting type";
    };
  };
}

default

{
  gh-form.<name>.dropdown = { };
}

gh-form.<name>.dropdown.<name>.description

Description of dropdown input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.dropdown.<name>.description = "Type of greeting message";
}

default

{
  gh-form.<name>.dropdown.<name>.description = null;
}

gh-form.<name>.dropdown.<name>.label

Label of dropdown input

See github documentations

type

non-empty string

example

{
  gh-form.<name>.dropdown.<name>.label = "Greeting type";
}

gh-form.<name>.dropdown.<name>.multiple

If more than one could be selected

See github documentations

type

boolean

example

{
  gh-form.<name>.dropdown.<name>.multiple = true;
}

default

{
  gh-form.<name>.dropdown.<name>.multiple = false;
}

gh-form.<name>.dropdown.<name>.options

Values that can be selected

See github documentations

type

list of non-empty string

example

{
  gh-form.<name>.dropdown.<name>.options = [
    "birthday"
    "new-year"
  ];
}

gh-form.<name>.dropdown.<name>.required

If this dropdown input is required

See github documentations

type

boolean

example

{
  gh-form.<name>.dropdown.<name>.required = true;
}

default

{
  gh-form.<name>.dropdown.<name>.required = false;
}

gh-form.<name>.input

Github forms body input fields

gh-forms.<file-name>.input.<field-id>.label = "<label>"; gh-forms.<file-name>.input.<field-id>.description = "<description>";

See github documentations

type

attribute set of (submodule)

example

{
  gh-form.<name>.input = {
    frequency = {
      description = "How many times it happens";
      label = "Frequency";
    };
  };
}

default

{
  gh-form.<name>.input = { };
}

gh-form.<name>.input.<name>.description

Description of input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.input.<name>.description = "How many times it happens";
}

default

{
  gh-form.<name>.input.<name>.description = null;
}

gh-form.<name>.input.<name>.label

Label of input

See github documentations

type

non-empty string

example

{
  gh-form.<name>.input.<name>.label = "Frequency";
}

gh-form.<name>.input.<name>.placeholder

Placeholder for input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.input.<name>.placeholder = "every 5 days";
}

default

{
  gh-form.<name>.input.<name>.placeholder = null;
}

gh-form.<name>.input.<name>.required

If this input is required

See github documentations

type

boolean

example

{
  gh-form.<name>.input.<name>.required = true;
}

default

{
  gh-form.<name>.input.<name>.required = false;
}

gh-form.<name>.input.<name>.value

Default value for input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.input.<name>.value = "11 times in a week";
}

default

{
  gh-form.<name>.input.<name>.value = null;
}

gh-form.<name>.labels

Labels to this kind of issue

see github documentations

type

list of non-empty string

example

{
  gh-form.<name>.labels = [
    "bug"
    "critical"
  ];
}

default

{
  gh-form.<name>.labels = [ ];
}

gh-form.<name>.markdown

Github forms body markdown fields

gh-forms.<file-name>.markdown.<field-id>.required = true; gh-forms.<file-name>.markdown.<field-id>.value = "<value>";

See github documentations

type

attribute set of (submodule)

example

{
  gh-form.<name>.markdown = {
    some = {
      required = true;
      value = "Some markdown text";
    };
  };
}

default

{
  gh-form.<name>.markdown = { };
}

gh-form.<name>.markdown.<name>.value

Default value for markdown input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.markdown.<name>.value = "11 times in a week";
}

default

{
  gh-form.<name>.markdown.<name>.value = "";
}

gh-form.<name>.name

A name for the issue form template

see github documentations

type

null or non-empty string

example

{
  gh-form.<name>.name = "Bug report";
}

default

{
  gh-form.<name>.name = null;
}

gh-form.<name>.text

Github forms body text fields

gh-forms.<file-name>.text.<field-id>.label = "<label>"; gh-forms.<file-name>.text.<field-id>.description = "<description>";

See github documentations

type

attribute set of (submodule)

example

{
  gh-form.<name>.text = {
    greeting = {
      description = "Insert your greeting message";
      label = "Greeting message";
    };
  };
}

default

{
  gh-form.<name>.text = { };
}

gh-form.<name>.text.<name>.description

Description of text input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.text.<name>.description = "Greeting message";
}

default

{
  gh-form.<name>.text.<name>.description = null;
}

gh-form.<name>.text.<name>.label

Label of text input

See github documentations

type

non-empty string

example

{
  gh-form.<name>.text.<name>.label = "Greeting message";
}

gh-form.<name>.text.<name>.placeholder

Placeholder for text input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.text.<name>.placeholder = "Insert your long text here";
}

default

{
  gh-form.<name>.text.<name>.placeholder = null;
}

gh-form.<name>.text.<name>.render

If this should be rendered as code block of specified type

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.text.<name>.render = "bash";
}

default

{
  gh-form.<name>.text.<name>.render = null;
}

gh-form.<name>.text.<name>.required

If this text input is required

See github documentations

type

boolean

example

{
  gh-form.<name>.text.<name>.required = true;
}

default

{
  gh-form.<name>.text.<name>.required = false;
}

gh-form.<name>.text.<name>.value

Default value for text input

See github documentations

type

null or non-empty string

example

{
  gh-form.<name>.text.<name>.value = "Happy new year!!";
}

default

{
  gh-form.<name>.text.<name>.value = null;
}

gh-form.<name>.title

Default title of issue

see github documentations

type

null or non-empty string

example

{
  gh-form.<name>.title = "[Bug]: ";
}

default

{
  gh-form.<name>.title = null;
}

gh-dependabot

Github dependabot configurations

gh-dependabot.<packager>."<directory>".interval = "<interval>";

See github documentations of package-ecosystem directory and interval

type

attribute set of attribute set of (submodule)

example

{
  gh-dependabot = {
    npm = true;
    pip = {
      "/" = {
        interval = "weekly";
      };
    };
  };
}

default

{
  gh-dependabot = { };
}

gh-dependabot.<name>.<name>.allow

Customize which dependencies are updated, see dependabot docs

type

null or (submodule)

example

{
  gh-dependabot.<name>.<name>.allow = {
    development = [
      "sphinix"
    ];
    production = true;
  };
}

default

{
  gh-dependabot.<name>.<name>.allow = null;
}

gh-dependabot.<name>.<name>.allow.all

All explicit and direct dependencies

type

(non-empty (list of non-empty string)) or boolean

example

{
  gh-dependabot.<name>.<name>.allow.all = [
    "express"
  ];
}

default

{
  gh-dependabot.<name>.<name>.allow.all = false;
}

gh-dependabot.<name>.<name>.allow.development

Dependencies for development

type

(non-empty (list of non-empty string)) or boolean

example

{
  gh-dependabot.<name>.<name>.allow.development = [
    "express"
  ];
}

default

{
  gh-dependabot.<name>.<name>.allow.development = false;
}

gh-dependabot.<name>.<name>.allow.direct

All explicitly defined dependencies

type

(non-empty (list of non-empty string)) or boolean

example

{
  gh-dependabot.<name>.<name>.allow.direct = [
    "express"
  ];
}

default

{
  gh-dependabot.<name>.<name>.allow.direct = false;
}

gh-dependabot.<name>.<name>.allow.indirect

Dependencies of dependencies

type

(non-empty (list of non-empty string)) or boolean

example

{
  gh-dependabot.<name>.<name>.allow.indirect = [
    "express"
  ];
}

default

{
  gh-dependabot.<name>.<name>.allow.indirect = false;
}

gh-dependabot.<name>.<name>.allow.production

Dependencies for production

type

(non-empty (list of non-empty string)) or boolean

example

{
  gh-dependabot.<name>.<name>.allow.production = [
    "express"
  ];
}

default

{
  gh-dependabot.<name>.<name>.allow.production = false;
}

gh-dependabot.<name>.<name>.assignees

Who will be assigned to pull request

type

list of non-empty string

example

{
  gh-dependabot.<name>.<name>.assignees = [
    "jaoooooo"
  ];
}

default

{
  gh-dependabot.<name>.<name>.assignees = [ ];
}

gh-dependabot.<name>.<name>.auto-rebase

Disable auto rebase (enabled by default) see github documentations

type

null or boolean

example

{
  gh-dependabot.<name>.<name>.auto-rebase = false;
}

default

{
  gh-dependabot.<name>.<name>.auto-rebase = null;
}

gh-dependabot.<name>.<name>.commit

Customize commit message prefix, see dependabot docs

type

null or (submodule)

example

{
  gh-dependabot.<name>.<name>.commit = {
    prefix = "RED-ALERT";
    prefix-dev = "warn";
    scope = true;
  };
}

default

{
  gh-dependabot.<name>.<name>.commit = null;
}

gh-dependabot.<name>.<name>.commit.dev-prefix

Prefix of commit message for development dependencies

type

null or non-empty string

example

{
  gh-dependabot.<name>.<name>.commit.dev-prefix = "warn";
}

default

{
  gh-dependabot.<name>.<name>.commit.dev-prefix = null;
}

gh-dependabot.<name>.<name>.commit.prefix

Prefix of commit message

type

non-empty string

example

{
  gh-dependabot.<name>.<name>.commit.prefix = "RED-ALERT";
}

gh-dependabot.<name>.<name>.commit.scope

If commit message should be contain scope

type

boolean

example

{
  gh-dependabot.<name>.<name>.commit.scope = true;
}

default

{
  gh-dependabot.<name>.<name>.commit.scope = false;
}

gh-dependabot.<name>.<name>.day

Day of week for weekly run (null is monday)

type

null or one of "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"

example

{
  gh-dependabot.<name>.<name>.day = "friday";
}

default

{
  gh-dependabot.<name>.<name>.day = null;
}

gh-dependabot.<name>.<name>.ignore

Customize which dependencies are ignored, see dependabot docs

type

attribute set of ((submodule) or boolean)

example

{
  gh-dependabot.<name>.<name>.ignore = {
    django = {
      major = true;
      minor = true;
      patch = true;
    };
    express = true;
    sphinix = {
      versions = [
        "4.x"
        "5.x"
      ];
    };
  };
}

default

{
  gh-dependabot.<name>.<name>.ignore = { };
}

gh-dependabot.<name>.<name>.insecure-external-code-execution

Deny or allow external code execution, see github documentations

type

null or boolean

example

{
  gh-dependabot.<name>.<name>.insecure-external-code-execution = true;
}

default

{
  gh-dependabot.<name>.<name>.insecure-external-code-execution = null;
}

gh-dependabot.<name>.<name>.interval

Periodicity of check: daily weekly monthly

type

one of "daily", "weekly", "monthly"

example

{
  gh-dependabot.<name>.<name>.interval = "monthly";
}

default

{
  gh-dependabot.<name>.<name>.interval = "weekly";
}

gh-dependabot.<name>.<name>.labels

Labels to be added in pull request see github documentations

type

list of non-empty string

example

{
  gh-dependabot.<name>.<name>.labels = [
    "depencencies"
  ];
}

default

{
  gh-dependabot.<name>.<name>.labels = [ ];
}

gh-dependabot.<name>.<name>.limit

Maximum open pull requests before next update see github documentations

type

null or signed integer

example

{
  gh-dependabot.<name>.<name>.limit = 5;
}

default

{
  gh-dependabot.<name>.<name>.limit = null;
}

gh-dependabot.<name>.<name>.milestoneId

Id of milestone associated with see github documentations

type

null or signed integer

example

{
  gh-dependabot.<name>.<name>.milestoneId = 4;
}

default

{
  gh-dependabot.<name>.<name>.milestoneId = null;
}

gh-dependabot.<name>.<name>.reviewers

List of developers to review see github documentations

type

list of non-empty string

example

{
  gh-dependabot.<name>.<name>.reviewers = [
    "your-user-name"
    "your-org/some-team"
  ];
}

default

{
  gh-dependabot.<name>.<name>.reviewers = [ ];
}

gh-dependabot.<name>.<name>.separator

branch name separator see github documentations

type

null or non-empty string

example

{
  gh-dependabot.<name>.<name>.separator = "-";
}

default

{
  gh-dependabot.<name>.<name>.separator = null;
}

gh-dependabot.<name>.<name>.target-branch

Branch to be target see github documentations

type

null or non-empty string

example

{
  gh-dependabot.<name>.<name>.target-branch = "your-main-branch";
}

default

{
  gh-dependabot.<name>.<name>.target-branch = null;
}

gh-dependabot.<name>.<name>.time

Time of day to check for updates (format: hh:mm)

type

null or string matching the pattern [0-2][0-9]:[0-5][0-9]

example

{
  gh-dependabot.<name>.<name>.time = "16:25";
}

default

{
  gh-dependabot.<name>.<name>.time = null;
}

gh-dependabot.<name>.<name>.timezone

Specify an time zone, time zone identifier is defined by iana

type

null or non-empty string

example

{
  gh-dependabot.<name>.<name>.timezone = "Asia/Tokyo";
}

default

{
  gh-dependabot.<name>.<name>.timezone = null;
}

gh-dependabot.<name>.<name>.vendor

tell Dependabot to vendor dependencies see github documentations

type

boolean

example

{
  gh-dependabot.<name>.<name>.vendor = true;
}

default

{
  gh-dependabot.<name>.<name>.vendor = false;
}

gh-dependabot.<name>.<name>.versioning-strategy

Dependabot versioning strategy see github documentations

type

null or one of "lockfile-only", "auto", "widen", "increase", "increase-if-necessary"

example

{
  gh-dependabot.<name>.<name>.versioning-strategy = "auto";
}

default

{
  gh-dependabot.<name>.<name>.versioning-strategy = null;
}

gh-dependabot-registry

Disable auto rebase (enabled by default) see github documentations

type

attribute set of (submodule)

example

{
  gh-dependabot-registry = {
    maven-github = {
      secret-name = "MY_ARTIFACTORY_PASSWORD";
      type = "maven-repository";
      url = "https://maven.pkg.github.com/your-org";
      username = "your-repo-login";
    };
  };
}

default

{
  gh-dependabot-registry = { };
}

gh-dependabot-registry.<name>.organization

organization name of login in registry

type

null or non-empty string

example

{
  gh-dependabot-registry.<name>.organization = "your-org";
}

default

{
  gh-dependabot-registry.<name>.organization = null;
}

gh-dependabot-registry.<name>.replaces-base

replaces base url

type

boolean

example

{
  gh-dependabot-registry.<name>.replaces-base = true;
}

default

{
  gh-dependabot-registry.<name>.replaces-base = false;
}

gh-dependabot-registry.<name>.secret-name-key

gitub sercret name of key to access registry

type

null or non-empty string

example

{
  gh-dependabot-registry.<name>.secret-name-key = "MY_ARTIFACTORY_KEY";
}

default

{
  gh-dependabot-registry.<name>.secret-name-key = null;
}

gh-dependabot-registry.<name>.secret-name-pass

gitub sercret name of password to access registry

type

null or non-empty string

example

{
  gh-dependabot-registry.<name>.secret-name-pass = "MY_ARTIFACTORY_PASSWORD";
}

default

{
  gh-dependabot-registry.<name>.secret-name-pass = null;
}

gh-dependabot-registry.<name>.secret-name-token

gitub sercret name of token to access registry

type

null or non-empty string

example

{
  gh-dependabot-registry.<name>.secret-name-token = "MY_ARTIFACTORY_TOKEN";
}

default

{
  gh-dependabot-registry.<name>.secret-name-token = null;
}

gh-dependabot-registry.<name>.type

type of registry

type

non-empty string

example

{
  gh-dependabot-registry.<name>.type = "maven-repository";
}

gh-dependabot-registry.<name>.url

url of registry

type

null or non-empty string

example

{
  gh-dependabot-registry.<name>.url = "https://maven.pkg.github.com/your-org";
}

default

{
  gh-dependabot-registry.<name>.url = null;
}

gh-dependabot-registry.<name>.username

username of registry

type

null or non-empty string

example

{
  gh-dependabot-registry.<name>.username = "your-repo-login";
}

default

{
  gh-dependabot-registry.<name>.username = null;
}

See also