'How to combine having serverless and docker in github actions
I am running my tests on aws lambda with the use of custom image. I'm using serverless for the configuration and the build of the image.
Process works fine locally. When I try to make it work with github actions, using serverless/github-action@v3 I'm getting an error:
Error: Could not find Docker installation. Ensure Docker is installed before continuing.
But since you can use 2 "uses:" I'm not sure how to work this one out. Any idea would be welcomed.
Solution 1:[1]
I don't know why the action cannot find docker installation but I resolved it by running the serverless command directly as follows:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm i -g serverless
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-1
- name: deploy
run: sls deploy --stage dev --verbose
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | boar |