Skip to content

Commit

Permalink
Let it be "Wingman Action"
Browse files Browse the repository at this point in the history
  • Loading branch information
n-valchev committed Jul 11, 2024
0 parents commit 5d2a3b8
Show file tree
Hide file tree
Showing 28 changed files with 30,777 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# EditorConfig http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

# do not format these files
[{**/node_modules/**}]
indent_style = unset
indent_size = unset
end_of_line = unset
charset = unset
trim_trailing_whitespace = false
insert_final_newline = false
72 changes: 72 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2022,
"project": ["./tsconfig.json"]
},
"env": {
"node": true,
"es2022": true
},
"rules": {
"object-shorthand": "error",
"no-duplicate-imports": "error",
"import/no-unresolved": [
"error",
{
"ignore": [
"contentlayer/generated",
"contentlayer/source-files",
"next-contentlayer/hooks"
]
}
],
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
["parent", "sibling"],
"index",
"object",
"type"
],
"newlines-between": "always",
"distinctGroup": false
}
],
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "inline-type-imports"
}
],
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_"
}
]
},
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
},
"node": {
"extensions": [".ts", ".js", ".json"]
}
}
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Always check-out / check-in files with LF line endings.
* text=auto eol=lf
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches:
- main

pull_request:
branches:
- main

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"

- name: Install dependencies
run: npm install

- name: Run CI scripts
run: npm run ci
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
coverage
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.15.0
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage
dist
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 FlyCI LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "FlyCI Wingman"
description: "Automatically Fix Your Failing CI Builds"

runs:
using: "composite"
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.12"

- uses: fly-ci/wingman-action/dist@${{ github.action_ref }}
18 changes: 18 additions & 0 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import esbuild from "esbuild";

/**
* @type {import("esbuild").BuildOptions}
*/
const config = {
entryPoints: ["src/index.ts"],
bundle: true,
outfile: "dist/index.js",
platform: "node",
target: "node20",
logLevel: "info",
define: {
"process.env.NODE_ENV": '"production"',
},
};

await esbuild.build(config);
6 changes: 6 additions & 0 deletions dist/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: "FlyCI Wingman"
description: "Automatically Fix Your Failing CI Builds"

runs:
using: "node20"
main: "index.js"
Loading

0 comments on commit 5d2a3b8

Please sign in to comment.