Description
Adds a repository to Codacy for code quality analysis and monitoring.
Input Schema
| Property | Type | Description | Required |
|---|---|---|---|
| owner | any | - | |
| provider | any | - | |
| repository | any | - |
Output Schema
No output schema defined for this action.
Usage Examples
Add a new GitHub organization repo to Codacy after publishing
This adds a newly created GitHub repository to Codacy. Use it when your workflow publishes code with publish:github after generating files with fetch:template.
steps:
- id: fetch-base
action: fetch:template
input:
url: ./skeleton
targetPath: .
values:
name: ${{ parameters.serviceName }}
description: ${{ parameters.description }}
- id: publish-github
action: publish:github
input:
repoUrl: github.com?owner=acme-inc&repo=payments-api
description: Payments API service
defaultBranch: main
- id: codacy-add-repo
action: codacy:add-repo
input:
provider: github
owner: acme-inc
repository: payments-apiParameterized GitHub owner and repo from template inputs
This uses template parameters for the GitHub owner and repo. Use when the same template supports multiple teams or repo names.
steps:
- id: fetch-svc
action: fetch:template
input:
url: ./skeleton
targetPath: .
values:
name: ${{ parameters.repoName }}
owner: ${{ parameters.githubOrg }}
- id: publish-github
action: publish:github
input:
repoUrl: github.com?owner=${{ parameters.githubOrg }}&repo=${{ parameters.repoName }}
defaultBranch: main
- id: codacy-add-repo
action: codacy:add-repo
input:
provider: github
owner: ${{ parameters.githubOrg }}
repository: ${{ parameters.repoName }}Add a GitLab group project to Codacy in a GitLab-based workflow
This adds a GitLab project to Codacy. Use it when you publish to GitLab with publish:gitlab.
steps:
- id: fetch-svc
action: fetch:template
input:
url: ./gitlab-skeleton
targetPath: .
values:
name: ${{ parameters.projectName }}
group: ${{ parameters.gitlabGroup }}
- id: publish-gitlab
action: publish:gitlab
input:
repoUrl: gitlab.com?owner=${{ parameters.gitlabGroup }}&repo=${{ parameters.projectName }}
defaultBranch: main
- id: codacy-add-repo
action: codacy:add-repo
input:
provider: gitlab
owner: ${{ parameters.gitlabGroup }}
repository: ${{ parameters.projectName }}Add a Bitbucket Cloud repository to Codacy
This adds a Bitbucket Cloud repository owned by a workspace to Codacy. Use it with publish:bitbucket when your org uses Bitbucket.
steps:
- id: fetch-app
action: fetch:template
input:
url: ./bitbucket-skeleton
targetPath: .
values:
name: ${{ parameters.repoName }}
workspace: ${{ parameters.bitbucketWorkspace }}
- id: publish-bb
action: publish:bitbucket
input:
repoUrl: bitbucket.org?owner=${{ parameters.bitbucketWorkspace }}&repo=${{ parameters.repoName }}
description: CLI tool for build automation
defaultBranch: main
- id: codacy-add-repo
action: codacy:add-repo
input:
provider: bitbucket
owner: ${{ parameters.bitbucketWorkspace }}
repository: ${{ parameters.repoName }}Add a GitHub Enterprise repo to Codacy for self-hosted environments
This adds a repository hosted on GitHub Enterprise to Codacy. Use it when publishing with publish:github:enterprise.
steps:
- id: fetch-service
action: fetch:template
input:
url: ./skeleton
targetPath: .
values:
name: ${{ parameters.serviceId }}
owner: ${{ parameters.ghOwner }}
- id: publish-ghe
action: publish:github:enterprise
input:
repoUrl: ghe.example.com?owner=${{ parameters.ghOwner }}&repo=${{ parameters.serviceId }}
defaultBranch: main
- id: codacy-add-repo
action: codacy:add-repo
input:
provider: github-enterprise
owner: ${{ parameters.ghOwner }}
repository: ${{ parameters.serviceId }}