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
5 changes: 4 additions & 1 deletion .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ concurrency:
jobs:
build-base:
runs-on: ubuntu-latest
env:
HTTP_CLI_VERSION: v1.1.0
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
Expand All @@ -47,6 +49,7 @@ jobs:
--platform linux/arm64,linux/amd64 \
--provenance=false \
--secret id=github_token,src=github_token \
--build-arg HTTP_CLI_VERSION=${{ env.HTTP_CLI_VERSION }} \
--target base \
--tag ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:base \
--tag public.ecr.aws/j5r7n1v7/lambda-shell-runtime:base \
Expand All @@ -60,7 +63,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false || github.event_name != 'pull_request'
env:
HTTP_CLI_VERSION: v1.0.1
HTTP_CLI_VERSION: v1.1.0
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ concurrency:
jobs:
build-base:
runs-on: ubuntu-latest
env:
HTTP_CLI_VERSION: v1.1.0
steps:
- uses: actions/checkout@v4

Expand All @@ -48,6 +50,7 @@ jobs:
--platform linux/arm64 \
--provenance=false \
--secret id=github_token,src=github_token \
--build-arg HTTP_CLI_VERSION=${{ env.HTTP_CLI_VERSION }} \
--target base \
--tag ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:base \
--push \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ concurrency:
jobs:
build-installers:
runs-on: ubuntu-latest
env:
HTTP_CLI_VERSION: v1.1.0
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM public.ecr.aws/lambda/provided:al2023 AS builder

ARG HTTP_CLI_VERSION=v1.0.1
ARG HTTP_CLI_VERSION=v1.1.0

RUN dnf install -y unzip && \
dnf clean all
Expand Down
21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,31 @@ help: ## Show this help
build: tiny micro full ## Build all variants locally

base: ## Build base image
VERSION=$(VERSION) ./build --platform $(PLATFORM) --tag $(TAG) --load base
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --load base

tiny: base ## Build tiny variant
VERSION=$(VERSION) ./build --platform $(PLATFORM) --tag $(TAG) --load tiny
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --load tiny

micro: base ## Build micro variant
VERSION=$(VERSION) ./build --platform $(PLATFORM) --tag $(TAG) --load micro
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --load micro

full: base ## Build full variant
VERSION=$(VERSION) ./build --platform $(PLATFORM) --tag $(TAG) --load full
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --load full

push-base: ## Push base to registry
VERSION=$(VERSION) ./build --platform $(PLATFORM) --tag $(REGISTRY)/$(TAG) --push base
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --registry $(REGISTRY) --push base

push: ## Push all variants to registry
VERSION=$(VERSION) ./build --platform $(PLATFORM) --tag $(REGISTRY)/$(TAG) --push tiny micro full
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --registry $(REGISTRY) --push tiny micro full

push-ghcr: ## Push all variants to GitHub Container Registry
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --ghcr --push tiny micro full

push-public-ecr: ## Push all variants to AWS Public ECR
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --public-ecr --push tiny micro full

push-all: ## Push to both GHCR and Public ECR
VERSION=$(VERSION) ./build-enhanced --platform $(PLATFORM) --tag $(TAG) --ghcr --public-ecr --push tiny micro full

clean: ## Remove local images
docker rmi -f $(TAG):base $(TAG):tiny $(TAG):micro $(TAG):full 2>/dev/null || true
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,30 @@ The shell runtime is **highly competitive** with official runtimes while providi
# Optimize shell script performance
```

## Updating http-cli Version

The runtime includes [http-cli](https://github.com/ql4b/http-cli) for simplified HTTP operations. To update to a newer version:

1. **Update version in all configuration files:**
- `.github/workflows/build-and-release.yml` (2 locations)
- `.github/workflows/build-base.yml`
- `.github/workflows/build-installers.yml`
- `Dockerfile` (ARG HTTP_CLI_VERSION)
- `build-enhanced` script (default value)

2. **Trigger a new build:**
```bash
# Push changes to trigger GitHub Actions
git add .
git commit -m "Update http-cli to vX.X.X"
git push origin develop
```

3. **Or build locally:**
```bash
HTTP_CLI_VERSION=v1.2.0 ./build-enhanced --load tiny
```

## Contributing

We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for details.
Expand Down
3 changes: 3 additions & 0 deletions build-enhanced
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ PLATFORM="linux/arm64"
MODE="--load"
TAG="lambda-shell-runtime"
VERSION="${VERSION:-develop}"
HTTP_CLI_VERSION="${HTTP_CLI_VERSION:-v1.0.1}"
VARIANTS="base tiny micro full"
REGISTRIES=""

Expand Down Expand Up @@ -79,6 +80,8 @@ for VARIANT in $VARIANTS; do
--platform "$PLATFORM" \
--provenance=false \
--secret id=github_token,env=GITHUB_TOKEN \
--build-arg VERSION="$VERSION" \
--build-arg HTTP_CLI_VERSION="$HTTP_CLI_VERSION" \
$TAGS \
--file "$DOCKERFILE" \
${TARGET:+--target "$TARGET"} \
Expand Down