Open jmrodriguez-lab opened 2 years ago
I had this same issue as well but ended up not using this github-action. Try installing serverless manually and running the deploy command and that worked for me.
Did you find any solution to this using Github Actions? I'm also considering using the CI/CD service from Serverless - any experience there?
This worked for me:
on:
push:
branches: [ "staging", "main" ]
jobs:
<job_name_here>:
runs-on: ubuntu-latest
env:
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
steps:
- uses: actions/checkout@v3
- name: install-python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: install serverless
run: npm i -g serverless
- name: severless deploy
run: sls deploy --verbose --force
Deploying lambdas using docker images instead of layers is possible with serverless as explained here. An example:
however, this requires
docker
command to be available in docker image specified in theDockerfile
, which is not installed.Could it be added, please? :-)