@@ -31,15 +31,24 @@ jobs:
3131 registry : ghcr.io
3232 username : ${{ github.actor }}
3333 password : ${{ secrets.GHCR_PAT }}
34+ - name : Configure AWS credentials
35+ uses : aws-actions/configure-aws-credentials@v4
36+ with :
37+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
38+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
39+ aws-region : us-east-1
40+ - name : Log in to Public ECR
41+ run : aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
3442 - name : Build and push base
3543 run : |
3644 echo "${{ secrets.GHCR_PAT }}" > github_token
3745 docker buildx build \
38- --platform linux/arm64 \
46+ --platform linux/arm64,linux/amd64 \
3947 --provenance=false \
4048 --secret id=github_token,src=github_token \
4149 --target base \
4250 --tag ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:base \
51+ --tag public.ecr.aws/j5r7n1v7/lambda-shell-runtime:base \
4352 --push \
4453 .
4554 env :
@@ -99,15 +108,35 @@ jobs:
99108 echo "SHOULD_RELEASE=false" >> $GITHUB_ENV
100109 fi
101110 echo "Detected VERSION: $VERSION"
111+ - name : Configure AWS credentials
112+ uses : aws-actions/configure-aws-credentials@v4
113+ with :
114+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
115+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
116+ aws-region : us-east-1
102117 - name : Log in to GHCR
103118 run : echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u skunxicat --password-stdin
119+ - name : Log in to Public ECR
120+ run : aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
104121 - name : Build and push images
105122 run : |
106123 echo "${{ secrets.GHCR_PAT }}" > github_token
107124 export GITHUB_TOKEN="${{ secrets.GHCR_PAT }}"
108125
109- # Build and push all variants
110- make push VERSION="$VERSION" REGISTRY="ghcr.io/${{ github.repository_owner }}"
126+ # Build and push to both registries
127+ ./build-enhanced --push --ghcr --public-ecr --platform linux/arm64,linux/amd64 tiny micro full
128+
129+ # Also tag latest for main branch releases
130+ if [ "${{ github.ref_name }}" = "main" ] && [ "$SHOULD_RELEASE" = "true" ]; then
131+ for VARIANT in tiny micro full; do
132+ docker buildx imagetools create \
133+ ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:$VARIANT \
134+ --tag ghcr.io/${{ github.repository_owner }}/lambda-shell-runtime:$VARIANT-latest
135+ docker buildx imagetools create \
136+ public.ecr.aws/j5r7n1v7/lambda-shell-runtime:$VARIANT \
137+ --tag public.ecr.aws/j5r7n1v7/lambda-shell-runtime:$VARIANT-latest
138+ done
139+ fi
111140 shell : bash
112141 - name : Create release
113142 if : env.SHOULD_RELEASE == 'true'
0 commit comments