From b3909b9854c04aa7effd98751cca4c54444b08e8 Mon Sep 17 00:00:00 2001 From: Elias Rami Date: Mon, 30 Sep 2024 15:39:49 +0200 Subject: [PATCH 1/2] fix: use working dir in argo diff command as repo root path --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 5a8f317..d28df28 100644 --- a/src/main.ts +++ b/src/main.ts @@ -276,7 +276,7 @@ async function run(): Promise { const diffs: Diff[] = []; await asyncForEach(apps, async app => { - const command = `app diff ${app.metadata.name} --local=${app.spec.source.path}`; + const command = `app diff ${app.metadata.name} --local-repo-root=${process.cwd()} --local=${app.spec.source.path}`; try { core.info(`Running: argocd ${command}`); // ArgoCD app diff will exit 1 if there is a diff, so always catch, From 2a813f45cb7af116b4dd25384b7fcb2f1205d4a3 Mon Sep 17 00:00:00 2001 From: Elyytscha Date: Mon, 30 Sep 2024 15:58:30 +0200 Subject: [PATCH 2/2] chore: npm build and pack --- dist/index.js | 2 +- package-lock.json | 15 ++++++++------- package.json | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dist/index.js b/dist/index.js index 9d9a27d..b823bac 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1903,7 +1903,7 @@ function run() { core.info(`Found apps: ${apps.map(a => a.metadata.name).join(', ')}`); const diffs = []; yield asyncForEach(apps, (app) => __awaiter(this, void 0, void 0, function* () { - const command = `app diff ${app.metadata.name} --local=${app.spec.source.path}`; + const command = `app diff ${app.metadata.name} --local-repo-root=${process.cwd()} --local=${app.spec.source.path}`; try { core.info(`Running: argocd ${command}`); // ArgoCD app diff will exit 1 if there is a diff, so always catch, diff --git a/package-lock.json b/package-lock.json index 19f9eb7..c2c0f6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "devDependencies": { "@types/jest": "^24.0.23", - "@types/node": "^12.7.12", + "@types/node": "^12.20.55", "@typescript-eslint/parser": "^2.8.0", "@zeit/ncc": "^0.20.5", "eslint": "^5.16.0", @@ -749,9 +749,10 @@ "dev": true }, "node_modules/@types/node": { - "version": "12.12.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz", - "integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==" + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==", + "license": "MIT" }, "node_modules/@types/node-fetch": { "version": "2.5.10", @@ -8986,9 +8987,9 @@ "dev": true }, "@types/node": { - "version": "12.12.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.14.tgz", - "integrity": "sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==" + "version": "12.20.55", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz", + "integrity": "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==" }, "@types/node-fetch": { "version": "2.5.10", diff --git a/package.json b/package.json index f753527..ff3fb03 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ }, "devDependencies": { "@types/jest": "^24.0.23", - "@types/node": "^12.7.12", + "@types/node": "^12.20.55", "@typescript-eslint/parser": "^2.8.0", "@zeit/ncc": "^0.20.5", "eslint": "^5.16.0",