-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework workflows to support building multiple images
Signed-off-by: Marcelo E. Magallon <[email protected]>
- Loading branch information
Showing
7 changed files
with
122 additions
and
51 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
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,10 @@ | ||
name: validate and publish commit to dev | ||
|
||
on: | ||
push: | ||
#push: | ||
# branches: | ||
# - main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM --platform=$TARGETOS/$TARGETARCH scratch | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
ADD ./dist/build-artifacts-image-browser-${TARGETARCH}.tar / | ||
|
||
ENV K6_BROWSER_ARGS=no-sandbox,disable-dev-shm-usage | ||
|
||
ENTRYPOINT ["tini", "--", "/usr/local/bin/synthetic-monitoring-agent"] |
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,8 @@ | ||
FROM --platform=$TARGETOS/$TARGETARCH scratch AS release | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
ADD ./dist/build-artifacts-image-${TARGETARCH}.tar / | ||
|
||
ENTRYPOINT ["/usr/local/bin/synthetic-monitoring-agent"] |
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,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
set -u | ||
|
||
image_name=$1 | ||
output=$2 | ||
|
||
container_id=$(docker container create "${image_name}") | ||
trap 'docker container rm "${container_id}"' EXIT | ||
docker container export -o "${output}" "${container_id}" |
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,9 @@ | ||
#!/bin/sh | ||
|
||
data=$(mktemp) | ||
trap 'rm -f $data' EXIT | ||
|
||
cat "$1" > "$data" | ||
|
||
echo "image=$(jq -r '.target["docker-metadata-action"].args.DOCKER_META_IMAGES' < "$data")" | ||
echo "tag=$(jq -r '.target["docker-metadata-action"].args.DOCKER_META_VERSION' < "$data")" |