Skip to content

Commit f6f173f

Browse files
committed
feat: support Gitea Actions
1 parent 6628648 commit f6f173f

File tree

4 files changed

+23
-0
lines changed

4 files changed

+23
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Officially supported CI servers:
5353
| [Gerrit CI](https://www.gerritcodereview.com) | `ci.GERRIT` | 🚫 |
5454
| [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` ||
5555
| [GitLab CI](https://about.gitlab.com/gitlab-ci/) | `ci.GITLAB` ||
56+
| [Gitea Actions](https://about.gitea.com/) | `ci.GITEA_ACTIONS` | 🚫 |
5657
| [GoCD](https://www.go.cd/) | `ci.GOCD` | 🚫 |
5758
| [Google Cloud Build](https://cloud.google.com/build) | `ci.GOOGLE_CLOUD_BUILD` | 🚫 |
5859
| [Harness CI](https://www.harness.io/products/continuous-integration) | `ci.HARNESS` | 🚫 |

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const DRONE: boolean;
4444
export const DSARI: boolean;
4545
export const EAS: boolean;
4646
export const GERRIT: boolean;
47+
export const GITEA_ACTIONS: boolean;
4748
export const GITHUB_ACTIONS: boolean;
4849
export const GITLAB: boolean;
4950
export const GOCD: boolean;

test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,22 @@ test('ReleaseHub', function (t) {
916916
t.end()
917917
})
918918

919+
test('Gitea Actions', function (t) {
920+
process.env.GITEA_ACTIONS = 'true'
921+
922+
clearModule('./')
923+
const ci = require('./')
924+
925+
t.equal(ci.isCI, true)
926+
t.equal(ci.name, 'Gitea Actions')
927+
t.equal(ci.GITEA_ACTIONS, true)
928+
assertVendorConstants('GITEA_ACTIONS', ci, t)
929+
930+
delete process.env.GITEA_ACTIONS
931+
932+
t.end()
933+
})
934+
919935
function assertVendorConstants (expect, ci, t) {
920936
ci._vendors.forEach(function (constant) {
921937
let bool = constant === expect

vendors.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@
114114
"constant": "GERRIT",
115115
"env": "GERRIT_PROJECT"
116116
},
117+
{
118+
"name": "Gitea Actions",
119+
"constant": "GITEA_ACTIONS",
120+
"env": "GITEA_ACTIONS"
121+
},
117122
{
118123
"name": "GitHub Actions",
119124
"constant": "GITHUB_ACTIONS",

0 commit comments

Comments
 (0)