Skip to content

Commit a217fb6

Browse files
committed
feat: add base image build step to release workflow
1 parent dde782d commit a217fb6

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,21 @@ jobs:
4545
${{ runner.os }}-buildx-
4646
- name: Get version from semantic-release
4747
id: version
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4850
run: |
49-
VERSION=$(npx semantic-release --dry-run | grep -oP 'The next release version is \K[0-9]+\.[0-9]+\.[0-9]+')
51+
set -euo pipefail
52+
53+
echo "Running semantic-release dry-run to extract next version..."
54+
VERSION=$(npx semantic-release --no-ci --dry-run 2>&1 | tee semantic-output.log | grep -oP 'The next release version is \K[0-9]+\.[0-9]+\.[0-9]+' || true)
55+
56+
if [ -z "$VERSION" ]; then
57+
echo "❌ Failed to extract VERSION from semantic-release output:"
58+
cat semantic-output.log
59+
exit 1
60+
fi
61+
62+
echo "✅ Detected VERSION: $VERSION"
5063
echo "VERSION=$VERSION" >> $GITHUB_ENV
5164
- name: Build Docker images
5265
run: |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ RUN dnf install -y \
105105

106106
LABEL org.opencontainers.image.title="lambda-shell-runtime:full"
107107
LABEL org.opencontainers.image.version="${VERSION}"
108-
LABEL org.opencontainers.image.http_cli_version="${HTTP_CLI_VERSION}"
108+
LABEL org.opencontainers.image.http_cli_version="${HTTP_CLI_VERSION}"

base.Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
FROM public.ecr.aws/lambda/provided:al2023 AS builder
1+
FROM lambda-shell-runtime:base AS tiny
22

3+
<<<<<<<< HEAD:base.Dockerfile
34
ARG HTTP_CLI_VERSION=v1.0.1
45

56
RUN dnf install -y unzip && \
@@ -35,4 +36,9 @@ WORKDIR /var/task
3536
COPY task/handler.sh handler.sh
3637

3738
# Label for documentation/reference
38-
LABEL org.opencontainers.image.title="lambda-shell-runtime:base"
39+
LABEL org.opencontainers.image.title="lambda-shell-runtime:base"
40+
========
41+
COPY task/helpers.sh helpers.sh
42+
43+
LABEL org.opencontainers.image.title="lambda-shell-runtime:tiny"
44+
>>>>>>>> 09d81b0 (chore(ci): add base image build step to release workflow):tiny.Dockerfile

build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ for VARIANT in $VARIANTS; do
4545

4646
[ "$VARIANT" = "base" ] && TARGET=""
4747

48+
[ "$VARIANT" = "base" ] && MODE="--load"
49+
4850
echo "Building $VARIANT ($DOCKERFILE) with platform $PLATFORM..."
4951
docker buildx build \
5052
--platform "$PLATFORM" \

0 commit comments

Comments
 (0)