Skip to content

Commit

Permalink
feat: support Gitea Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Oct 29, 2023
1 parent 6628648 commit f6f173f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Officially supported CI servers:
| [Gerrit CI](https://www.gerritcodereview.com) | `ci.GERRIT` | 🚫 |
| [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` ||
| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` ||
| [Gitea Actions](https://about.gitea.com/) | `ci.GITEA_ACTIONS` | 🚫 |
| [GoCD](https://www.go.cd/) | `ci.GOCD` | 🚫 |
| [Google Cloud Build](https://cloud.google.com/build) | `ci.GOOGLE_CLOUD_BUILD` | 🚫 |
| [Harness CI](https://www.harness.io/products/continuous-integration) | `ci.HARNESS` | 🚫 |
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const DRONE: boolean;
export const DSARI: boolean;
export const EAS: boolean;
export const GERRIT: boolean;
export const GITEA_ACTIONS: boolean;
export const GITHUB_ACTIONS: boolean;
export const GITLAB: boolean;
export const GOCD: boolean;
Expand Down
16 changes: 16 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,22 @@ test('ReleaseHub', function (t) {
t.end()
})

test('Gitea Actions', function (t) {
process.env.GITEA_ACTIONS = 'true'

clearModule('./')
const ci = require('./')

t.equal(ci.isCI, true)
t.equal(ci.name, 'Gitea Actions')
t.equal(ci.GITEA_ACTIONS, true)
assertVendorConstants('GITEA_ACTIONS', ci, t)

delete process.env.GITEA_ACTIONS

t.end()
})

function assertVendorConstants (expect, ci, t) {
ci._vendors.forEach(function (constant) {
let bool = constant === expect
Expand Down
5 changes: 5 additions & 0 deletions vendors.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@
"constant": "GERRIT",
"env": "GERRIT_PROJECT"
},
{
"name": "Gitea Actions",
"constant": "GITEA_ACTIONS",
"env": "GITEA_ACTIONS"
},
{
"name": "GitHub Actions",
"constant": "GITHUB_ACTIONS",
Expand Down

0 comments on commit f6f173f

Please sign in to comment.