forked from release-drafter/release-drafter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve GitHub Action build times (release-drafter#742)
- Loading branch information
Showing
24 changed files
with
129,457 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ node_modules | |
coverage | ||
.buildkite | ||
*.pem | ||
.git | ||
.git | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
coverage | ||
coverage | ||
dist/ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
if [[ "$(git status --porcelain)" != "" ]]; then | ||
git status | ||
echo "::error::💥 Unstaged changes detected. Locally try running: yarn prettier && yarn lint --fix && yarn build" | ||
exit 1 | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ coverage | |
now.json | ||
docker-compose-logs | ||
package-lock.json | ||
dist/static/ | ||
dist/views/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
config-with-yaml-exception.yml | ||
dist/ | ||
coverage/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
{ | ||
"eslint.autoFixOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"files.exclude": { | ||
"dist/": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const { createProbot } = require('probot') | ||
const core = require('@actions/core') | ||
const app = require('./index') | ||
|
||
run().catch((err) => { | ||
core.setFailed(`💥 Release drafter failed with error: ${err.message}`) | ||
}) | ||
|
||
async function run() { | ||
if (!process.env.GITHUB_TOKEN) { | ||
throw new Error( | ||
'env.GITHUB_TOKEN must be set, see https://github.com/probot/example-github-action#usage' | ||
) | ||
} | ||
|
||
const envVariablesMissing = [ | ||
'GITHUB_RUN_ID', | ||
'GITHUB_EVENT_NAME', | ||
'GITHUB_EVENT_PATH', | ||
].filter((name) => !process.env[name]) | ||
|
||
if (envVariablesMissing.length) { | ||
const missingEnvs = envVariablesMissing.join(', ') | ||
throw new Error( | ||
`GitHub Action default environment variables missing: ${missingEnvs}. See https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables#default-environment-variables` | ||
) | ||
} | ||
|
||
const probot = createProbot({ | ||
overrides: { | ||
githubToken: process.env.GITHUB_TOKEN, | ||
}, | ||
}) | ||
|
||
await probot.load(app) | ||
|
||
return probot.receive({ | ||
id: process.env.GITHUB_RUN_ID, | ||
name: process.env.GITHUB_EVENT_NAME, | ||
payload: require(process.env.GITHUB_EVENT_PATH), | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.