Skip to content

Commit

Permalink
[CRITEO] Update build to be able to build it with github actions and …
Browse files Browse the repository at this point in the history
…to push operator artifact in release
  • Loading branch information
n.fraison authored and ashangit committed May 2, 2021
1 parent 3081a93 commit 09b2dce
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/criteo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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.14

- name: run build
run: make -j4 IMAGES='ceph' build

- run: pwd; ls -l

- 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 @@ -85,17 +85,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 @@ -53,6 +53,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
@$(DOCKERCMD) build $(BUILD_ARGS) \
--build-arg ARCH=$(GOARCH) \
Expand Down

0 comments on commit 09b2dce

Please sign in to comment.