Skip to content

Commit

Permalink
feat: setup github actipn
Browse files Browse the repository at this point in the history
  • Loading branch information
bonyuta0204 committed Nov 29, 2023
1 parent ad97117 commit 5a76d83
Show file tree
Hide file tree
Showing 7 changed files with 277 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'Auto Pull Request'
description: 'Greet someone and record the time'
inputs:
src-branch: # id of input
description: "src-branch"
required: true
runs:
using: 'node20'
main: 'dist/index.js'
21 changes: 21 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).
(() => {
var exports = __webpack_exports__;

Object.defineProperty(exports, "__esModule", ({ value: true }));
const a = { hoge: "hoge", fuga: 1 };
console.log(a);

})();

module.exports = __webpack_exports__;
/******/ })()
;
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "auto-pull-request",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"bundle": "npm run format:write && npm run package",
"format:write": "prettier --write **/*.ts",
"format:check": "prettier --check **/*.ts",
"package": "ncc build src/index.ts --license licenses.txt",
"package:watch": "npm run package -- --watch"
},
"keywords": [],
"author": "",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0"
},
"devDependencies": {
"@vercel/ncc": "^0.38.1",
"prettier": "^3.1.0",
"typescript": "^5.3.2"
},
"volta": {
"node": "20.10.0"
}
}
194 changes: 194 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import core from "@actions/core";

const srcBranch = core.getInput("src-branch");

console.log(srcBranch);
19 changes: 19 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"rootDir": "./src",
"moduleResolution": "NodeNext",
"baseUrl": "./",
"sourceMap": true,
"outDir": "./dist",
"noImplicitAny": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"newLine": "lf"
},
"exclude": ["./dist", "./node_modules", "./__tests__", "./coverage"]
}

0 comments on commit 5a76d83

Please sign in to comment.