Skip to content

Commit

Permalink
Parse JSON files input
Browse files Browse the repository at this point in the history
  • Loading branch information
debugger22 committed Aug 11, 2020
1 parent b833bb0 commit 903701c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
- uses: ./
id: migrations
with:
files: "migrations/test.sql package.json"
files: '["migrations/test.sql", "package.json"]'
- name: Echo output
run: echo ${{ steps.migrations.outputs.content }}
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const core = __webpack_require__(470);
const { promises: fs } = __webpack_require__(747);

const main = async () => {
const filePaths = core.getInput('files').split(" ");

const filePaths = JSON.parse(core.getInput('files'));
console.log(filePaths);
var output = "";

filePaths.forEach(async(filePath) => {
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const core = require('@actions/core');
const { promises: fs } = require('fs');

const main = async () => {
const filePaths = core.getInput('files').split(" ");

const filePaths = JSON.parse(core.getInput('files'));
console.log(filePaths);
var output = "";

filePaths.forEach(async(filePath) => {
Expand Down

0 comments on commit 903701c

Please sign in to comment.