-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (33 loc) · 1006 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
SHELL := $(shell which bash)
NO_COLOR :=\033[0m
OK_COLOR :=\033[32;01m
ERR_COLOR :=\033[31;01m
WARN_COLOR :=\033[36;01m
ATTN_COLOR :=\033[33;01m
# Github action env variables used by build container
GITHUB_SHA ?= $(shell git rev-parse HEAD 2>/dev/null)
GITHUB_WORKSPACE := /github/workspace
# build action input parameters
SOURCE_PATH := src
TARGET_PATH := build
TARGET_FILE := bundle.tar.gz
REVISION := $(GITHUB_SHA)
BUILD_OPTIONS :=
VERBOSE := false
.PHONY: build
build:
@echo -e "$(ATTN_COLOR)==> $@ $(NO_COLOR)"
@docker run \
-ti \
--rm \
--entrypoint "/app/build.sh" \
-v $(PWD):$(GITHUB_WORKSPACE) \
-e GITHUB_WORKSPACE=$(GITHUB_WORKSPACE) \
-e GITHUB_SHA=$(GITHUB_SHA) \
-e INPUT_SOURCE_PATH=$(SOURCE_PATH) \
-e INPUT_TARGET_PATH=$(TARGET_PATH) \
-e INPUT_TARGET_FILE=$(TARGET_FILE) \
-e INPUT_REVISION=$(REVISION) \
-e INPUT_BUILD_OPTIONS=$(BUILD_OPTIONS) \
-e INPUT_VERBOSE=$(VERBOSE) \
ghcr.io/aserto-dev/aserto-one:action-v2 > /dev/null