Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 1, 2021. It is now read-only.

Add GitHub Actions #10

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions packages/core/src/services/github.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://docs.gitlab.com/ce/ci/variables/README.html

export function detect() {
return !!process.env.GITHUB_ACTIONS
}

export function config() {
return {
name: 'GitHub Actions',
service: 'github',
build: process.env.GITHUB_RUN_ID,
commit: process.env.GITHUB_SHA,
branch: process.env.GITHUB_HEAD_REF || (process.env.GITHUB_REF && process.env.GITHUB_REF.split('/')[2]),
root: process.env.GITHUB_WORKSPACE,
slug: process.env.GITHUB_REPOSITORY,
}
}
2 changes: 2 additions & 0 deletions packages/core/src/services/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as circle from './circle'
import * as cirrus from './cirrus'
import * as codeship from './codeship'
import * as drone from './drone'
import * as github from './github'
import * as gitlab from './gitlab'
import * as heroku from './heroku'
import * as jenkins from './jenkins'
Expand All @@ -28,6 +29,7 @@ export default [
cirrus,
codeship,
drone,
github,
gitlab,
jenkins,
semaphore,
Expand Down