Skip to content

Commit d031126

Browse files
fix(cd): Add new cd steps with buildx for lambda arm/amd images (#37)
# Problem # Arm support needs lambda image to be updated for both architectures # Solution # Update Lambda cd steps to use buildx for both images to be tagged together
1 parent b75cf75 commit d031126

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: cd-dgraph-lambda
2+
on: workflow_dispatch
3+
jobs:
4+
dgraph-lambda-build:
5+
runs-on: ubuntu-20.04
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Set dgraph-lambda Release Version
9+
run: |
10+
#!/bin/bash
11+
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
12+
if [[ "$GIT_BRANCH_NAME" == "release/v"* ]];
13+
then
14+
echo "this is a release branch"
15+
else
16+
echo "this is NOT a release branch"
17+
exit 1
18+
fi
19+
DGRAPH_LAMBDA_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | sed 's/release\///')
20+
echo "making a new release for dgraph "$DGRAPH_LAMBDA_RELEASE_VERSION
21+
echo "DGRAPH_LAMBDA_RELEASE_VERSION=$DGRAPH_LAMBDA_RELEASE_VERSION" >> $GITHUB_ENV
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v2
24+
with:
25+
username: ${{ secrets.DOCKERHUB_USERNAME }}
26+
password: ${{ secrets.DOCKERHUB_PASSWORD_TOKEN }}
27+
- name: Push dgraph-lambda images
28+
run: |
29+
docker buildx create --name builder --driver docker-container
30+
docker buildx use builder
31+
docker buildx build -t dgraph/dgraph-lambda:${{ env.DGRAPH_LAMBDA_RELEASE_VERSION }} --push --platform=linux/arm64,linux/amd64 .

0 commit comments

Comments
 (0)