Skip to content

v0.2.2

v0.2.2 #24

Workflow file for this run

name: Deploy to Lambda
on:
release:
types: [released]
jobs:
publish_docker:
name: Build Docker image and publish to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.HUB_DOCKER_USERNAME }}
password: ${{ secrets.HUB_DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: eyevinntechnology/lambda-stitch
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy_lambda:
name: Build and Deploy Lambda
strategy:
matrix:
node-version: [16.x]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install and Build
run: |
npm ci
npm run build --if-present
env:
CI: true
- name: zip
uses: montudor/action-zip@v0.1.0
with:
args: zip -qq -r ./bundle.zip ./
- name: Default deploy
uses: appleboy/lambda-action@master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: eu-west-1
function_name: lambda-stitch-dev
zip_file: bundle.zip