This action requires a token for the user on whose behalf it will run.

CreateGitlabProject — creates a new project in GitLab through the GitLab API, using the specified name, project path, description, and other settings. Authentication uses a GitLab token provided in the credentials.

Request example

name: example
path: example
description: example
default_branch: main
initialize_with_readme: false
namespace_id: '0'

Request specification

NameRequiredDescriptionDefault value
nameYesName of the project to be created in GitLab-
pathYesURL-friendly project path. Usually matches the name, but may differ-
default_branchYesName of the branch to be used by default, e.g. “main”-
namespace_idYesIdentifier of the GitLab namespace in which the project will be created-
initialize_with_readmeNoFlag indicating whether the project should be initialized with a README filefalse
descriptionNoProject description visible to users-

Note

The action performs a POST request to the URL: /api/v4/projects, sending the request parameters in JSON format. Upon successful creation, GitLab returns data about the newly created project.