Skip to content

Commit

Permalink
build: add criteo build action
Browse files Browse the repository at this point in the history
Update build to be able to build it with github actions and to push operator artifact in release

Signed-off-by: n.fraison <[email protected]>
  • Loading branch information
n.fraison committed Jun 14, 2021
1 parent 2ee2047 commit 0c98032
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/criteo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on: release
jobs:

build:
name: Publish artifacts
runs-on: ubuntu-18.04
steps:
- name: checkout
uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: 1.16

- name: run build
run: GOPATH=$(go env GOPATH) make clean && make -j$nproc IMAGES='ceph' build

- name: upload ghr
uses: fnkr/github-action-ghr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHR_PATH: ./images/ceph/operator.tgz
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,14 @@ GO_TEST_FILTER=$(TESTFILTER)

include build/makelib/golang.mk

# setup helm charts
include build/makelib/helm.mk

# ====================================================================================
# Targets

build.version:
@mkdir -p $(OUTPUT_DIR)
@echo "$(VERSION)" > $(OUTPUT_DIR)/version

build.common: build.version helm.build mod.check
build.common: build.version mod.check
@$(MAKE) go.init
@$(MAKE) go.validate

Expand Down
2 changes: 2 additions & 0 deletions images/ceph/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ do.build: generate-csv-ceph-templates
else\
mkdir $(TEMP)/ceph-csv-templates;\
fi
@mkdir operator
@cp -r $(TEMP)/* operator; tar cvfz operator.tgz operator
@cd $(TEMP) && $(SED_CMD) 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile
@if [ -z "$(BUILD_CONTAINER_IMAGE)" ]; then\
$(DOCKERCMD) build $(BUILD_ARGS) \
Expand Down

0 comments on commit 0c98032

Please sign in to comment.