-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
b75cf75
commit d031126
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |