Skip to content

Commit

Permalink
fix(cd): Add new cd steps with buildx for lambda arm/amd images (#37)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
adityasadalage authored Dec 8, 2022
1 parent b75cf75 commit d031126
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/cd-dgraph-lambda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: cd-dgraph-lambda
on: workflow_dispatch
jobs:
dgraph-lambda-build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set dgraph-lambda Release Version
run: |
#!/bin/bash
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [[ "$GIT_BRANCH_NAME" == "release/v"* ]];
then
echo "this is a release branch"
else
echo "this is NOT a release branch"
exit 1
fi
DGRAPH_LAMBDA_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | sed 's/release\///')
echo "making a new release for dgraph "$DGRAPH_LAMBDA_RELEASE_VERSION
echo "DGRAPH_LAMBDA_RELEASE_VERSION=$DGRAPH_LAMBDA_RELEASE_VERSION" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD_TOKEN }}
- name: Push dgraph-lambda images
run: |
docker buildx create --name builder --driver docker-container
docker buildx use builder
docker buildx build -t dgraph/dgraph-lambda:${{ env.DGRAPH_LAMBDA_RELEASE_VERSION }} --push --platform=linux/arm64,linux/amd64 .

0 comments on commit d031126

Please sign in to comment.