-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from newrelic/cn/multi-platform-build
Add multi-platform build/push
- Loading branch information
Showing
2 changed files
with
12 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
image_name=newrelic/fastly-to-insights | ||
|
||
require_tag: | ||
@if [ -z "$(tag)" ]; then echo "tag must be set" && exit 1; fi | ||
@if [ "$(tag)" != "$(shell git describe --tags --exact-match)" ]; then echo "please checkout requested tag: $(tag)" && exit 1; fi | ||
|
||
release: require_tag | ||
docker buildx build --platform linux/amd64,linux/arm64 --push -t $(image_name):$(tag) . | ||
|
||
build: | ||
docker build -t $(image_name) . | ||
docker buildx build --platform linux/amd64,linux/arm64 -t $(image_name) . | ||
|
||
run: build | ||
docker run --rm --env-file .env --name fastly-to-insights $(image_name) |
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