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 <n.fraison@criteo.com>
  • Loading branch information
n.fraison committed Oct 15, 2021
1 parent 16d2ffb commit 9e95d3f
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
@@ -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
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
Expand Up @@ -80,6 +80,8 @@ ifeq ($(INCLUDE_CSV_TEMPLATES),true)
else
mkdir $(TEMP)/ceph-csv-templates
endif
@mkdir operator
@cp -r $(TEMP)/* operator; tar cvfz operator.tgz operator
@cd $(TEMP) && $(SED_IN_PLACE) 's|BASEIMAGE|$(BASEIMAGE)|g' Dockerfile
@if [ -z "$(BUILD_CONTAINER_IMAGE)" ]; then\
$(DOCKERCMD) build $(BUILD_ARGS) \
Expand Down

0 comments on commit 9e95d3f

Please sign in to comment.