Skip to content

miere/action-rust-aws-lambda

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate AWS Lambda package for Rust

This is a (WIP) GitHub Action that generates AWS Lambda compatible packages for your Rust project.

Acknowledgements

This project wouldn't be possible without the softprops/lambda-rust Docker Image and all the effort its contributors have put to generate a convenient foundation for building Rust packages using Docker.

How it works?

This action will use a customized Docker image that will generate a zip file for all Rust binaries created by your project. Each tagged version of this action is compatible with a Rust version of the same name.

Usage

name: Deployment

on:
  workflow_dispatch:

jobs:
  package:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
        name: Checkout Source Code

      - name: Building and packaging AWS Lambda functions
        uses: miere/rust-aws-lambda@1.51.0
        id: rust-aws-lambda
        # Only required if your source is not in the root folder
        # By default, source-dir points to '.'
        with:
          source-dir: "source"

      # Do something with the generated zip files
      # They will be generated at the target folder of your project.
      - name: Archive artifacts
        uses: actions/upload-artifact@v2
        with:
          name: "{{process.env.GITHUB_RUN_ID}}"
          path: "source/target/lambda/*.zip"