Skip to content

Commit

Permalink
Allow user to change working directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlawson committed May 18, 2024
1 parent 75c00d8 commit f0a5b90
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ jobs:
uses: serverless/[email protected]
with:
serverless-version: 3
args: deploy
```
## Change your working directory
```yaml
- name: Deploy from a particular working directory
uses: serverless/[email protected]
with:
working-directory: ./foo
args: deploy
```
## Usage with serverless plugins
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ inputs:
description: 'Version of the Serverless Framework to use (default: latest)'
required: false
default: latest
working-directory:
description: 'Folder where your configuration is located'
required: false
default: .
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.working-directory }}
- ${{ inputs.serverless-version }}
- ${{ inputs.args }}
5 changes: 3 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh -l
npm i -g serverless@${1/v/}
serverless $2
cd $1
npm i -g serverless@${2/v/}
serverless $3

0 comments on commit f0a5b90

Please sign in to comment.