Skip to content
This repository was archived by the owner on Feb 1, 2021. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 920ab37

Browse files
author
Michał Miszczyszyn
authoredJul 27, 2020
feat(cli): add GitHub Actions support (#10)
1 parent cc4c212 commit 920ab37

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
 

‎packages/core/src/services/github.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// https://docs.gitlab.com/ce/ci/variables/README.html
2+
3+
export function detect() {
4+
return !!process.env.GITHUB_ACTIONS
5+
}
6+
7+
export function config() {
8+
return {
9+
name: 'GitHub Actions',
10+
service: 'github',
11+
build: process.env.GITHUB_RUN_ID,
12+
commit: process.env.GITHUB_SHA,
13+
branch: process.env.GITHUB_HEAD_REF || (process.env.GITHUB_REF && process.env.GITHUB_REF.split('/')[2]),
14+
root: process.env.GITHUB_WORKSPACE,
15+
slug: process.env.GITHUB_REPOSITORY,
16+
}
17+
}

‎packages/core/src/services/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import * as circle from './circle'
55
import * as cirrus from './cirrus'
66
import * as codeship from './codeship'
77
import * as drone from './drone'
8+
import * as github from './github'
89
import * as gitlab from './gitlab'
910
import * as heroku from './heroku'
1011
import * as jenkins from './jenkins'
@@ -28,6 +29,7 @@ export default [
2829
cirrus,
2930
codeship,
3031
drone,
32+
github,
3133
gitlab,
3234
jenkins,
3335
semaphore,

0 commit comments

Comments
 (0)
This repository has been archived.