Skip to content

Commit

Permalink
produce kedacore/build-tools image in GitHub Action (#979)
Browse files Browse the repository at this point in the history
Signed-off-by: Zbynek Roubalik <[email protected]>
  • Loading branch information
zroubalik authored Aug 10, 2020
1 parent 111a2d7 commit 75b06d7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: build-tools CI
on:
push:
branches:
- master
- v2
paths:
- 'tools/**'
jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Login to Docker Hub
env:
DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
run: echo $DOCKER_HUB_ACCESS_TOKEN | docker login -u $DOCKER_HUB_USERNAME --password-stdin

- name: Build and publish Tools image
run: make publish-build-tools
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ IMAGE_REPO ?= kedacore
IMAGE_CONTROLLER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda:$(VERSION)
IMAGE_ADAPTER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda-metrics-adapter:$(VERSION)

IMAGE_BUILD_TOOLS = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/build-tools:latest

ARCH ?=amd64
CGO ?=0
TARGET_OS ?=linux
Expand Down Expand Up @@ -115,3 +117,11 @@ pkg/scalers/liiklus/LiiklusService.pb.go: hack/LiiklusService.proto

pkg/scalers/liiklus/mocks/mock_liiklus.go: pkg/scalers/liiklus/LiiklusService.pb.go
mockgen github.com/kedacore/keda/pkg/scalers/liiklus LiiklusServiceClient > pkg/scalers/liiklus/mocks/mock_liiklus.go

##################################################
# Build Tools Image #
##################################################
.PHONY: publish-build-tools
publish-build-tools:
docker build -f tools/build-tools.Dockerfile -t $(IMAGE_BUILD_TOOLS) .
docker push $(IMAGE_BUILD_TOOLS)

0 comments on commit 75b06d7

Please sign in to comment.