Skip to content

Commit 1d25279

Browse files
committed
fix: fix logging to ghcr step
1 parent 1b86371 commit 1d25279

File tree

5 files changed

+93
-0
lines changed

5 files changed

+93
-0
lines changed

.github/workflows/build-and-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ jobs:
6868
echo "SHOULD_RELEASE=false" >> $GITHUB_ENV
6969
fi
7070
echo "Detected VERSION: $VERSION"
71+
- name: Log in to GHCR
72+
run: echo "${{ secrets.GHCR_PAT }}" | docker login ghcr.io -u skunxicat --password-stdin
7173
- name: Build and push images
7274
run: |
7375
echo "${{ secrets.GHCR_PAT }}" > github_token

.github/workflows/build-ghcr.base.yml

Whitespace-only changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish to Docker Hub
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Login to Docker Hub
14+
uses: docker/login-action@v3
15+
with:
16+
username: ${{ secrets.DOCKERHUB_USERNAME }}
17+
password: ${{ secrets.DOCKERHUB_TOKEN }}
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Build and push
23+
run: |
24+
./build --platform linux/arm64,linux/amd64 --tag your-username/lambda-shell-runtime --push tiny micro full

.github/workflows/publish-ecr.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish to ECR Public
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Configure AWS credentials
15+
uses: aws-actions/configure-aws-credentials@v4
16+
with:
17+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
18+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
19+
aws-region: us-east-1
20+
21+
- name: Login to ECR Public
22+
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
23+
24+
- name: Build and push variants
25+
run: |
26+
for variant in tiny micro full; do
27+
docker buildx build \
28+
--platform linux/arm64,linux/amd64 \
29+
--target $variant \
30+
--secret id=github_token,env=GITHUB_TOKEN \
31+
--tag public.ecr.aws/j5r7n1v7/lambda-shell-runtime:$variant \
32+
--push \
33+
.
34+
done
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Fast Build & Publish
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Docker Buildx
14+
uses: docker/setup-buildx-action@v3
15+
with:
16+
driver-opts: |
17+
image=moby/buildkit:v0.12.0
18+
network=host
19+
20+
- name: Configure AWS credentials
21+
uses: aws-actions/configure-aws-credentials@v4
22+
with:
23+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
24+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25+
aws-region: us-east-1
26+
27+
- name: Login to ECR Public
28+
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
29+
30+
- name: Build with cache
31+
run: |
32+
export BUILDX_EXPERIMENTAL=1
33+
./build --platform linux/arm64,linux/amd64 --tag public.ecr.aws/your-alias/lambda-shell-runtime --push --cache-from type=gha --cache-to type=gha,mode=max tiny micro full

0 commit comments

Comments
 (0)