Closed matthewpoer closed 3 years ago
I was just about to start figuring this out but you've saved me some time. Thanks for the issue/documentation @matthewpoer
Update for all those who find this the hard way: serverless plugin install ...
will find and install the latest version of a plugin. You can tag specific versions, but I found this easier:
- name: Install SLS Plugins and Deploy
uses: serverless/github-action@v1.53.0
with:
args: -c "npm install --also=dev && npm list -g && npm list && serverless deploy --stage=${{ matrix.stages.stage }} --verbose"
entrypoint: /bin/bash
The extra npm list
bits are nice to check versions :D
For anyone getting this error:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown.
time="2021-08-24T14:37:43Z" level=error msg="error waiting for container: context canceled"
Change the entrypoint to /bin/sh
. It affects >2.18.0 (therefore master too).
More info on #52
does this not relevant if the plugins were installed with npm?
Sharing an example of using this Action with one or more SLS Serverless plugins. Would be nice to add some notes around this to the
README.md
. The key is to set bothargs
andentrypoint
on the step.Similar tactic is used in #26 to capture
resources.Outputs
data.