Skip to content

Commit

Permalink
Use tmp dir
Browse files Browse the repository at this point in the history
use tmp dir
test calling script twice
test latest master, and current
  • Loading branch information
KnicKnic authored Jul 29, 2020
1 parent 9322dbf commit b15f69a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,30 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./
with:
macos: echo "Hi from macos"
linux: |
echo "Hi from linux"
echo "Hi from linux second line"
windows: echo "Hi from windows"

- uses: ./
with:
macos: echo "test2"
linux: echo "test2"
windows: echo "test2"

- uses: knicknic/os-specific-run@master
with:
macos: echo "Hi from macos"
linux: |
echo "Hi from linux"
echo "Hi from linux second line"
windows: echo "Hi from windows"
windows: echo "Hi from windows"

- uses: knicknic/os-specific-run@master
with:
macos: echo "test2"
linux: echo "test2"
windows: echo "test2"
5 changes: 4 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,10 @@ async function body() {
let command = '';
let unformattedShell = '';

let file = path.join(process.env.GITHUB_WORKSPACE, uuidv4())
let tmpPath = path.join(path.sep, 'tmp', 'knicknic', 'os-specific-run')
await fs.promises.mkdir(tmpPath, { recursive: true });

let file = path.join(tmpPath, uuidv4())

// https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell

Expand Down
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ async function body() {
let command = '';
let unformattedShell = '';

let file = path.join(process.env.GITHUB_WORKSPACE, uuidv4())
let tmpPath = path.join(path.sep, 'tmp', 'knicknic', 'os-specific-run')
await fs.promises.mkdir(tmpPath, { recursive: true });

let file = path.join(tmpPath, uuidv4())

// https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell

Expand Down

0 comments on commit b15f69a

Please sign in to comment.