Skip to content

Commit

Permalink
Merge pull request #56 from Borales/dir
Browse files Browse the repository at this point in the history
Adding "dir" option
  • Loading branch information
Borales committed Nov 26, 2022
2 parents 5841a21 + 17af3bf commit 9e77a06
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
11 changes: 4 additions & 7 deletions action.yml
Expand Up @@ -8,13 +8,10 @@ inputs:
cmd:
description: 'Yarn command'
required: true
# auth-token:
# description: 'NPM_AUTH_TOKEN'
# registry-url:
# description: 'NPM_REGISTRY_URL'
dir:
description: 'Yarn sub-folder (if needed)'
required: false
default: ''
runs:
using: 'node16'
main: 'dist/index.js'
# env:
# NPM_AUTH_TOKEN: ${{ inputs.auth-token }}
# NPM_REGISTRY_URL: ${{ inputs.registry-url }}
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/index.ts
@@ -1,12 +1,14 @@
import {debug, getInput, setFailed, getState} from '@actions/core'
import {ensureYarnIsInstalled} from './yarn'
import {run} from './run'
import {resolve} from 'path'

const main = async () => {
await ensureYarnIsInstalled()

const cmd: string = getInput('cmd', {required: true})
const cwd: string = getState('repositoryPath')
const dir: string = getInput('dir')
const cwd: string = resolve(getState('repositoryPath'), dir || '')

try {
debug(`Running "${cmd}" command`)
Expand Down

0 comments on commit 9e77a06

Please sign in to comment.