From 2daf0efc772fb7bb6b5f3e3cd72a26a402c00f00 Mon Sep 17 00:00:00 2001 From: Sudhanshu Mishra Date: Tue, 11 Aug 2020 19:32:03 +0530 Subject: [PATCH] Use GITHUB_WORKSPACE to access files --- README.md | 2 +- dist/index.js | 2 +- index.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb02112..0e86b90 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Read Django migration files content. steps: - name: Read migrations id: migrations - uses: komorebitech/read-migration-files-action@v1.3 + uses: komorebitech/read-migration-files-action@v1.4 with: files: '["/migrations/001_initial.py", "/migrations/002_auto_2020_08_11_545462.py"]' - name: Echo migrations diff --git a/dist/index.js b/dist/index.js index d52d59c..20ad350 100644 --- a/dist/index.js +++ b/dist/index.js @@ -68,7 +68,7 @@ const main = async () => { if(filePath.includes("migrations")){ output += `========================== ${filePath} ==========================\n\n`; - const content = await fs.readFile(filePath, 'utf8'); + const content = await fs.readFile(process.env.GITHUB_WORKSPACE + "/" + filePath, 'utf8'); output += content + "\n\n"; } diff --git a/index.js b/index.js index efc67aa..5dda114 100644 --- a/index.js +++ b/index.js @@ -12,7 +12,7 @@ const main = async () => { if(filePath.includes("migrations")){ output += `========================== ${filePath} ==========================\n\n`; - const content = await fs.readFile(filePath, 'utf8'); + const content = await fs.readFile(process.env.GITHUB_WORKSPACE + "/" + filePath, 'utf8'); output += content + "\n\n"; }