Skip to content

Commit

Permalink
ci: support multi-arch builds (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
hgiasac authored Oct 23, 2024
1 parent 23ac343 commit 82013dc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
Empty file modified .github/scripts/plugin-manifest.sh
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
push: true
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}
platforms: linux/amd64,linux/arm64

build-cli-and-manifests:
name: Build the CLI binaries and manifests
Expand All @@ -65,6 +66,7 @@ jobs:
run: |
VERSION="$GITHUB_REF_NAME" make ci-build-cli
mkdir release
.github/scripts/plugin-manifest.sh
mv _output/* release
- name: Get version from tag
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ ci-build-cli: clean
cd ./ndc-rest-schema && \
go get github.com/mitchellh/gox && \
go run github.com/mitchellh/gox -ldflags '-X github.com/hasura/ndc-rest/ndc-rest-schema/version.BuildVersion=$(VERSION) -s -w -extldflags "-static"' \
-osarch="linux/amd64 darwin/amd64 windows/amd64 darwin/arm64" \
-osarch="linux/amd64 darwin/amd64 windows/amd64 darwin/arm64 linux/arm64" \
-output="../$(OUTPUT_DIR)/ndc-rest-schema-{{.OS}}-{{.Arch}}" \
.
1 change: 0 additions & 1 deletion scripts/build-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ mkdir -p $BUILD_DIR

cp -r connector-definition $BUILD_DIR
sed -i "s/{{VERSION}}/$VERSION/g" $BUILD_DIR/connector-definition/.hasura-connector/connector-metadata.yaml
sed -i "s/{{VERSION}}/$VERSION/g" $BUILD_DIR/connector-definition/.hasura-connector/Dockerfile

mkdir -p "${ROOT}/release"
tar -czvf "${ROOT}/release/connector-definition.tgz" --directory $BUILD_DIR/connector-definition .
Expand Down

0 comments on commit 82013dc

Please sign in to comment.