Skip to content

Commit

Permalink
Run image build, push only on merge
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
  • Loading branch information
ArangoGutierrez committed Jan 30, 2024
1 parent 36c97da commit e505bca
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 46 deletions.
37 changes: 0 additions & 37 deletions .github/ISSUE_TEMPLATE

This file was deleted.

7 changes: 2 additions & 5 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ on:

jobs:
build-image:
# We trigger image builds on push events (MERGED pull requests) or on non-closed PRs that are not created against a fork.
if: |
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
(github.event_name == 'push')
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -61,9 +57,10 @@ jobs:
echo "PUSH_ON_BUILD=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
echo "BUILD_MULTI_ARCH_IMAGES=${GENERATE_ARTIFACTS}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ PHONY: .shell
-v $(PWD):/work \
-w /work \
--user $$(id -u):$$(id -g) \
$(BUILDIMAGE)
$(BUILDIMAGE)
2 changes: 1 addition & 1 deletion deployments/container/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

ARG CUDA_VERSION
ARG BASE_DIST
ARG GOLANG_VERSION=1.20.5
ARG GOLANG_VERSION=x.x.x

FROM golang:${GOLANG_VERSION} AS build

Expand Down
1 change: 1 addition & 0 deletions deployments/container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ $(BUILD_TARGETS): build-%:
$(DOCKER_BUILD_PLATFORM_OPTIONS) \
--tag $(IMAGE) \
--build-arg BASE_DIST="$(DIST)" \
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
--build-arg CUDA_VERSION="$(CUDA_VERSION)" \
--build-arg VERSION="$(VERSION)" \
--build-arg CVE_UPDATES="$(CVE_UPDATES)" \
Expand Down
4 changes: 2 additions & 2 deletions versions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MODULE := github.com/NVIDIA/k8s-driver-manager
vVERSION := v$(VERSION:v%=%)

CUDA_VERSION := 12.3.0
GOLANG_VERSION ?= 1.20.5
GOLANG_VERSION ?= 1.20.4

BUILDIMAGE_TAG ?= devel-go$(GOLANG_VERSION)
BUILDIMAGE ?= ghcr.io/nvidia/k8s-test-infra:$(BUILDIMAGE_TAG)
BUILDIMAGE ?= ghcr.io/nvidia/k8s-test-infra:$(BUILDIMAGE_TAG)

0 comments on commit e505bca

Please sign in to comment.