Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/serverless-dev.yml
Comment thread
limit7412 marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: serverless-dev

on: pull_request

permissions:
id-token: write
contents: read

jobs:
deploy:
name: deploy
Expand All @@ -23,8 +27,7 @@ jobs:
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ap-northeast-1

- name: deploy
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM virtuslab/scala-cli:latest as build-image

RUN apt-get update && apt-get install -y libcurl4-openssl-dev && rm -rf /var/lib/apt/lists/*
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To minimize the Docker image layer size and avoid installing unnecessary packages, it's a good practice to use the --no-install-recommends flag with apt-get install.

RUN apt-get update && apt-get install -y --no-install-recommends libcurl4-openssl-dev && rm -rf /var/lib/apt/lists/*


WORKDIR /work
COPY ./ ./

RUN scala-cli clean .
RUN scala-cli config power true
# target GraalVM
RUN scala-cli --power package --native-image -o bootstrap .
# RUN scala-cli --power package --native-image -o bootstrap .
# target Scala Native
# RUN scala-cli --power package --native -o bootstrap .
RUN scala-cli --power package --native -o bootstrap .
RUN chmod +x bootstrap

FROM public.ecr.aws/lambda/provided:latest
Expand Down
10 changes: 4 additions & 6 deletions project.scala
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// for GraalVM
//> using packaging.graalvmArgs --static
//> using packaging.graalvmArgs --no-fallback
// //> using packaging.graalvmArgs --static
// //> using packaging.graalvmArgs --no-fallback
// for Scala Native
// //> using platform native
// //> using nativeTarget library-static
//> using platform native
//> using toolkit default
//> using dep "com.softwaremill.sttp.client4::core:4.0.0-M14"
//> using dep "com.lihaoyi::upickle:3.3.1"
//> using dep "com.lihaoyi::upickle:4.4.2"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The upickle dependency is set to version 4.4.2, which does not appear to be a published version. The latest known version is 3.3.1. Using a non-existent version will cause a dependency resolution failure and break the build. Please correct the version to a valid one.

Suggested change
//> using dep "com.lihaoyi::upickle:4.4.2"
//> using dep "com.lihaoyi::upickle:3.3.1"

Loading