first commit

This commit is contained in:
LucaZanni committed 2024-07-05 19:36:57 +02:00
commit d6911d3327
7 files changed
+31998

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
node_modules
dist/pagent.exe
+96
View File
@@ -0,0 +1,96 @@
# K8s YAML Generator GitHub Action
This GitHub Action generates Kubernetes YAML files from configuration and environment variables. It leverages inputs from the user to create ConfigMap, Service, Deployment, and HorizontalPodAutoscaler YAML files.
## Usage
To use this action in your GitHub workflow, add the following steps to your `.github/workflows/*.yml` file:
```yaml
name: Generate K8s YAML
on: [push]
jobs:
generate-yaml:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Generate K8s YAML
uses: ./
with:
instance: 'my-instance'
namespace: 'my-namespace'
serviceType: 'ClusterIP'
targetPort: 8080
replicas: 3
registry: 'my-registry'
owner: 'my-owner'
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 75
verbose: 'true'
path: './config'
```
## Inputs
| Input | Description | Required | Default |
|----------------------------------|---------------------------------------------------------------|----------|--------------------|
| `instance` | Instance of the application | No | `''` |
| `namespace` | Namespace for Kubernetes | No | `default` |
| `serviceType` | Type of Kubernetes Service | No | `ClusterIP` |
| `targetPort` | Target port for the service | No | `8080` |
| `replicas` | Number of replicas for the deployment | No | `1` |
| `registry` | Docker registry for the image | Yes | |
| `owner` | Owner of the Docker image | Yes | |
| `minReplicas` | Minimum replicas for the HorizontalPodAutoscaler | No | `1` |
| `maxReplicas` | Maximum replicas for the HorizontalPodAutoscaler | No | `3` |
| `targetCPUUtilizationPercentage` | Target CPU Utilization Percentage for the HorizontalPodAutoscaler | No | `80` |
| `verbose` | Enable verbose logging | No | `false` |
| `path` | Directory path for package.json, build-info.json, and .env files | No | `.` |
## Outputs
This action does not produce any outputs.
## Example
Below is an example of a GitHub workflow that uses this action:
```yaml
name: Generate K8s YAML
on: [push]
jobs:
generate-yaml:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Generate K8s YAML
uses: ./
with:
instance: 'example-instance'
namespace: 'example-namespace'
serviceType: 'ClusterIP'
targetPort: 8080
replicas: 2
registry: 'dockerhub.io'
owner: 'example-owner'
minReplicas: 1
maxReplicas: 5
targetCPUUtilizationPercentage: 75
verbose: 'true'
path: './config'
```
## Contributing
Contributions are welcome! Please open an issue or submit a pull request with your changes.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
+52
View File
@@ -0,0 +1,52 @@
name: 'K8s YAML Generator'
description: 'Genera file YAML per Kubernetes da configurazioni e variabili di ambiente'
inputs:
instance:
description: 'Instance of the application'
required: false
default: ''
namespace:
description: 'Namespace for Kubernetes'
required: false
default: 'default'
serviceType:
description: 'Type of Kubernetes Service'
required: false
default: 'ClusterIP'
targetPort:
description: 'Target port for the service'
required: false
default: 8080
replicas:
description: 'Number of replicas for the deployment'
required: false
default: 1
registry:
description: 'Docker registry for the image'
required: true
owner:
description: 'Owner of the Docker image'
required: true
minReplicas:
description: 'Minimum replicas for the HPA'
required: false
default: 1
maxReplicas:
description: 'Maximum replicas for the HPA'
required: false
default: 3
targetCPUUtilizationPercentage:
description: 'Target CPU Utilization Percentage for the HPA'
required: false
default: 80
verbose:
description: 'Enable verbose logging'
required: false
default: 'false'
path:
description: 'Directory path for package.json, build-info.json, and .env files'
required: false
default: '.'
runs:
using: 'node12'
main: 'dist/index.js'
+31288
View File
File diff suppressed because it is too large. Load diff
+187
View File
@@ -0,0 +1,187 @@
const core = require('@actions/core');
const fs = require("fs");
const yaml = require("js-yaml");
const dotenv = require("dotenv");
const path = require("path");
const verbose = core.getInput("verbose") === "true";
function log(msg) {
if (verbose) {
console.log(msg);
}
}
const contextPath = core.getInput("path") || '.';
const exit = (msg) => {
console.error(msg);
process.exit(1);
};
// Carica le variabili di ambiente dal file .env
const envPath = path.join(contextPath, ".env");
if (fs.existsSync(envPath)) {
dotenv.config({ path: envPath });
log("Caricate le variabili di ambiente dal file .env");
} else {
exit(`File .env non trovato nel percorso ${envPath}`);
}
const packagePath = path.join(contextPath, "package.json");
if (!fs.existsSync(packagePath)) {
exit(`File package.json non trovato nel percorso ${packagePath}`);
}
const package = require(packagePath);
const buildInfoPath = path.join(contextPath, "build-info.json");
let buildInfo = { buildNumber: 0 };
if (fs.existsSync(buildInfoPath)) {
buildInfo = JSON.parse(fs.readFileSync(buildInfoPath, "utf8"));
}
log(`build-info.json content: ${JSON.stringify(buildInfo)}`);
const port = parseInt(process.env.PORT, 10);
const version = `${package.version}-${buildInfo.buildNumber}`;
const autor = package.author.replace(" ", "_");
// Valori di default
const defaultConfig = {
replicas: 1,
targetPort: 8080,
namespace: "default",
instance: "",
minReplicas: 1,
maxReplicas: 3,
targetCPUUtilizationPercentage: 80
};
// Ottieni le configurazioni dagli input dell'azione, utilizzando i valori di default se non specificati
const config = {
instance: core.getInput('instance') || defaultConfig.instance,
namespace: core.getInput('namespace') || defaultConfig.namespace,
serviceType: core.getInput('serviceType') || 'ClusterIP',
targetPort: parseInt(core.getInput('targetPort'), 10) || defaultConfig.targetPort,
replicas: parseInt(core.getInput('replicas'), 10) || defaultConfig.replicas,
registry: core.getInput('registry', { required: true }),
owner: core.getInput('owner', { required: true }),
minReplicas: parseInt(core.getInput('minReplicas'), 10) || defaultConfig.minReplicas,
maxReplicas: parseInt(core.getInput('maxReplicas'), 10) || defaultConfig.maxReplicas,
targetCPUUtilizationPercentage: parseInt(core.getInput('targetCPUUtilizationPercentage'), 10) || defaultConfig.targetCPUUtilizationPercentage
};
// Verifica che i parametri obbligatori siano presenti
if (!config.registry) {
exit("Parametro 'registry' obbligatorio non fornito.");
}
if (!config.owner) {
exit("Parametro 'owner' obbligatorio non fornito.");
}
// Definisci i metadati di base utilizzati da tutti gli oggetti
const baseMetadata = {
labels: {
"app.kubernetes.io/name": package.name,
"app.kubernetes.io/author": autor,
"app.kubernetes.io/version": version,
"app.kubernetes.io/instance": config.instance
},
namespace: config.namespace || "default"
};
// ConfigMap
const configMap = {
apiVersion: "v1",
kind: "ConfigMap",
metadata: { ...baseMetadata, name: `${package.name}-config` },
data: dotenv.parse(fs.readFileSync(envPath))
};
// Service
const service = {
apiVersion: "v1",
kind: "Service",
metadata: { ...baseMetadata, name: `${package.name}-service` },
spec: {
type: config.serviceType,
selector: baseMetadata.labels,
ports: [{ port: config.targetPort, targetPort: port, protocol: "TCP" }]
}
};
// Deployment
const deployment = {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: { ...baseMetadata, name: `${package.name}` },
spec: {
replicas: config.replicas,
selector: { matchLabels: baseMetadata.labels },
template: {
metadata: { labels: baseMetadata.labels },
spec: {
containers: [
{
name: package.name,
image: `${config.registry}/${config.owner}/${package.name}:${version}`,
ports: [{ containerPort: port }],
envFrom: [{ configMapRef: { name: `${package.name}-config` } }],
imagePullPolicy: "Always"
}
],
imagePullSecrets: [{ name: "regcred" }]
}
}
}
};
// HorizontalPodAutoscaler
const autoscaler = {
apiVersion: "autoscaling/v1",
kind: "HorizontalPodAutoscaler",
metadata: { ...baseMetadata, name: `${package.name}-autoscaler` },
spec: {
scaleTargetRef: {
apiVersion: "apps/v1",
kind: "Deployment",
name: package.name
},
minReplicas: config.minReplicas,
maxReplicas: config.maxReplicas,
targetCPUUtilizationPercentage: config.targetCPUUtilizationPercentage
}
};
// Opzioni YAML
const yamlOptions = {
noRefs: true,
styles: { "!!str": "double" }
};
const yamlContents = [];
yamlContents.push(yaml.dump(configMap, yamlOptions));
yamlContents.push(yaml.dump(service, yamlOptions));
yamlContents.push(yaml.dump(deployment, yamlOptions));
yamlContents.push(yaml.dump(autoscaler, yamlOptions));
const allYaml = yamlContents.join("\n---\n");
const directoryPath = path.join(__dirname, "k8s"); // Imposta il percorso della directory
// Verifica se la directory esiste
if (!fs.existsSync(directoryPath)) {
// Se non esiste, creala
fs.mkdirSync(directoryPath, { recursive: true });
log(`Creata la directory ${directoryPath}`);
}
// Scrive il file YAML finale
fs.writeFile(path.join(directoryPath, "all-in-one.yaml"), allYaml, "utf8", (err) => {
if (err) {
console.error("Errore durante la scrittura del file YAML:", err);
core.setFailed(`Errore durante la scrittura del file YAML: ${err.message}`);
} else {
log("File YAML all-in-one creato con successo!");
}
});
+349
View File
@@ -0,0 +1,349 @@
{
"name": "k8s-yaml-generator",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "k8s-yaml-generator",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^6.0.0",
"dotenv": "^8.2.0",
"fs": "0.0.1-security",
"js-yaml": "^3.14.0",
"path": "^0.12.7"
},
"devDependencies": {
"@vercel/ncc": "^0.38.1"
}
},
"node_modules/@actions/core": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
"integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"node_modules/@actions/github": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
"integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
"dependencies": {
"@actions/http-client": "^2.2.0",
"@octokit/core": "^5.0.1",
"@octokit/plugin-paginate-rest": "^9.0.0",
"@octokit/plugin-rest-endpoint-methods": "^10.0.0"
}
},
"node_modules/@actions/http-client": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz",
"integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==",
"dependencies": {
"tunnel": "^0.0.6",
"undici": "^5.25.4"
}
},
"node_modules/@fastify/busboy": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.1.tgz",
"integrity": "sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==",
"engines": {
"node": ">=14"
}
},
"node_modules/@octokit/auth-token": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/core": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
"dependencies": {
"@octokit/auth-token": "^4.0.0",
"@octokit/graphql": "^7.1.0",
"@octokit/request": "^8.3.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.0.0",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/endpoint": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.5.tgz",
"integrity": "sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==",
"dependencies": {
"@octokit/types": "^13.1.0",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/graphql": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz",
"integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==",
"dependencies": {
"@octokit/request": "^8.3.0",
"@octokit/types": "^13.0.0",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/openapi-types": {
"version": "22.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz",
"integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz",
"integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==",
"dependencies": {
"@octokit/types": "^12.6.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": "5"
}
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
},
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"dependencies": {
"@octokit/openapi-types": "^20.0.0"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "10.4.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
"dependencies": {
"@octokit/types": "^12.6.0"
},
"engines": {
"node": ">= 18"
},
"peerDependencies": {
"@octokit/core": "5"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
},
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
"version": "12.6.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
"dependencies": {
"@octokit/openapi-types": "^20.0.0"
}
},
"node_modules/@octokit/request": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz",
"integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==",
"dependencies": {
"@octokit/endpoint": "^9.0.1",
"@octokit/request-error": "^5.1.0",
"@octokit/types": "^13.1.0",
"universal-user-agent": "^6.0.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/request-error": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.0.tgz",
"integrity": "sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==",
"dependencies": {
"@octokit/types": "^13.1.0",
"deprecation": "^2.0.0",
"once": "^1.4.0"
},
"engines": {
"node": ">= 18"
}
},
"node_modules/@octokit/types": {
"version": "13.5.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz",
"integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==",
"dependencies": {
"@octokit/openapi-types": "^22.2.0"
}
},
"node_modules/@vercel/ncc": {
"version": "0.38.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.38.1.tgz",
"integrity": "sha512-IBBb+iI2NLu4VQn3Vwldyi2QwaXt5+hTyh58ggAMoCGE6DJmPvwL3KPBWcJl1m9LYPChBLE980Jw+CS4Wokqxw==",
"dev": true,
"bin": {
"ncc": "dist/ncc/cli.js"
}
},
"node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dependencies": {
"sprintf-js": "~1.0.2"
}
},
"node_modules/before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
},
"node_modules/deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"node_modules/dotenv": {
"version": "8.6.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz",
"integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==",
"engines": {
"node": ">=10"
}
},
"node_modules/esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"bin": {
"esparse": "bin/esparse.js",
"esvalidate": "bin/esvalidate.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/fs": {
"version": "0.0.1-security",
"resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
"integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
},
"node_modules/inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw=="
},
"node_modules/js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dependencies": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/path": {
"version": "0.12.7",
"resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
"dependencies": {
"process": "^0.11.1",
"util": "^0.10.3"
}
},
"node_modules/process": {
"version": "0.11.10",
"resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
"engines": {
"node": ">= 0.6.0"
}
},
"node_modules/sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g=="
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/undici": {
"version": "5.28.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
"engines": {
"node": ">=14.0"
}
},
"node_modules/universal-user-agent": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="
},
"node_modules/util": {
"version": "0.10.4",
"resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
"integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
"dependencies": {
"inherits": "2.0.3"
}
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
}
}
+24
View File
@@ -0,0 +1,24 @@
{
"name": "k8s-yaml-generator",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"package": "ncc build index.js -o dist",
"build": "ncc build index.js",
"start": "node index.js"
},
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^6.0.0",
"dotenv": "^8.2.0",
"fs": "0.0.1-security",
"js-yaml": "^3.14.0",
"path": "^0.12.7"
},
"keywords": [],
"author": "Luca Zanni",
"license": "MIT",
"devDependencies": {
"@vercel/ncc": "^0.38.1"
}
}