-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cd): add cd workflow to slash branch (#8698)
### Remarks - Only need to push amd docker image - Do not need Badger CLI tools for slash release - We will never push latest tag from this branch, so omit such logic entirely
- Loading branch information
1 parent
dc32d85
commit 65fff46
Showing
5 changed files
with
103 additions
and
11 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,73 @@ | ||
name: cd-dgraph | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releasetag: | ||
description: releasetag | ||
required: true | ||
type: string | ||
jobs: | ||
dgraph-build-amd64: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: '${{ github.event.inputs.releasetag }}' | ||
- name: Get Go Version | ||
run: | | ||
#!/bin/bash | ||
GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) | ||
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GOVERSION }} | ||
- name: Install protobuf-compiler | ||
run: sudo apt-get install -y protobuf-compiler | ||
- name: Check protobuf | ||
run: | | ||
cd ./protos | ||
go mod tidy | ||
make regenerate | ||
git diff --exit-code -- . | ||
- name: Set Dgraph Release Version | ||
run: | | ||
#!/bin/bash | ||
GIT_TAG_NAME='${{ github.event.inputs.releasetag }}' | ||
if [[ "$GIT_TAG_NAME" == "v"* ]]; | ||
then | ||
echo "this is a release tag" | ||
else | ||
echo "this is NOT a release tag" | ||
exit 1 | ||
fi | ||
DGRAPH_RELEASE_VERSION='${{ github.event.inputs.releasetag }}' | ||
echo "making a new release for dgraph "$DGRAPH_RELEASE_VERSION | ||
echo "DGRAPH_RELEASE_VERSION=$DGRAPH_RELEASE_VERSION" >> $GITHUB_ENV | ||
- name: Make Dgraph Linux Build | ||
run: make dgraph DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }} | ||
- name: Generate SHA for Dgraph Linux Build | ||
run: cd dgraph && sha256sum dgraph | cut -c-64 > dgraph-checksum-linux-amd64.sha256 | ||
- name: Tar Archive for Dgraph Linux Build | ||
run: cd dgraph && tar -zcvf dgraph-linux-amd64.tar.gz dgraph | ||
- name: Upload Build Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: | | ||
dgraph/dgraph-checksum-linux-amd64.sha256 | ||
dgraph/dgraph-linux-amd64.tar.gz | ||
- name: Make Dgraph Docker Image | ||
run: | | ||
make docker-image DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }} | ||
- name: Make Dgraph Standalone Docker Image with Version | ||
run: | | ||
make docker-image-standalone DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }} | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD_TOKEN }} | ||
- name: Push Images to DockerHub | ||
run: | | ||
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }} | ||
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.18.5 | ||
1.18 |
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
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
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