From 7906b3198f0646529d4c12fa8380093d32e58153 Mon Sep 17 00:00:00 2001 From: Christian Lobach Date: Tue, 11 May 2021 12:12:47 +0200 Subject: [PATCH] swap script contents --- actions/create_scriptable/action.yml | 4 ++-- actions/generate_data/action.yml | 4 ++-- src/createScriptable.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/actions/create_scriptable/action.yml b/actions/create_scriptable/action.yml index a95581b..4617528 100644 --- a/actions/create_scriptable/action.yml +++ b/actions/create_scriptable/action.yml @@ -1,5 +1,5 @@ name: 'Convert Impfdashboard data' -description: 'Downloads TSV formatted data, extracts relevant data and converts it to JSON.' +description: 'Converts the .js file to a .scriptable file' runs: using: 'node12' - main: '../../src/index.js' \ No newline at end of file + main: '../../src/createScriptable.js' \ No newline at end of file diff --git a/actions/generate_data/action.yml b/actions/generate_data/action.yml index 4617528..a95581b 100644 --- a/actions/generate_data/action.yml +++ b/actions/generate_data/action.yml @@ -1,5 +1,5 @@ name: 'Convert Impfdashboard data' -description: 'Converts the .js file to a .scriptable file' +description: 'Downloads TSV formatted data, extracts relevant data and converts it to JSON.' runs: using: 'node12' - main: '../../src/createScriptable.js' \ No newline at end of file + main: '../../src/index.js' \ No newline at end of file diff --git a/src/createScriptable.js b/src/createScriptable.js index 5d0ca44..1981bc8 100644 --- a/src/createScriptable.js +++ b/src/createScriptable.js @@ -2,9 +2,9 @@ const fs = require('fs'); const core = require('@actions/core'); try { - const scriptable = JSON.parse(fs.readFileSync('../../scriptable/Impfdashboard.scriptable', 'utf8')); + const scriptable = JSON.parse(fs.readFileSync('./scriptable/Impfdashboard.scriptable', 'utf8')); - const originalScript = fs.readFileSync('../../scriptable/Impfdashboard.js', 'utf8'); + const originalScript = fs.readFileSync('./scriptable/Impfdashboard.js', 'utf8'); let output = originalScript.split('\n'); for (let i = 0; i < 3; i += 1) { @@ -15,7 +15,7 @@ try { scriptable.script = output; - fs.writeFileSync('../../scriptable/Impfdashboard.scriptable', JSON.stringify(scriptable)); + fs.writeFileSync('./scriptable/Impfdashboard.scriptable', JSON.stringify(scriptable)); } catch (err) { core.setFailed(err.message); }