diff --git a/Dockerfile b/Dockerfile index 4586c37..5aa07e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -ARG TAG="v1.5" -ARG COMMIT="52f0664ffcf3b76344374426030b18158567ed40" ARG BCI_IMAGE=registry.suse.com/bci/bci-base ARG GO_IMAGE=rancher/hardened-build-base:v1.21.11b3 @@ -17,13 +15,13 @@ RUN set -x && \ # Build the project FROM base-builder as builder #RUN apk add --update --virtual build-dependencies build-base linux-headers bash -ARG TAG +ARG TAG=v1.6.0 ARG SRC="github.com/k8snetworkplumbingwg" ARG REPO_PATH="${SRC}/network-resources-injector" RUN git clone --depth=1 https://github.com/k8snetworkplumbingwg/network-resources-injector WORKDIR network-resources-injector RUN git fetch --all --tags --prune -RUN git checkout ${COMMIT} -b ${TAG} +RUN git checkout tags/${TAG} -b ${TAG} RUN go mod download ARG TARGETPLATFORM ENV CGO_ENABLED=0 diff --git a/Makefile b/Makefile index b2e58ef..6764b24 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ ORG ?= rancher TAG ?= ${GITHUB_ACTION_TAG} ifeq ($(TAG),) -TAG := v1.5$(BUILD_META) +TAG := v1.6.0$(BUILD_META) endif ifeq (,$(filter %$(BUILD_META),$(TAG))) diff --git a/updatecli/updatecli.d/update-upstream.yaml b/updatecli/updatecli.d/update-upstream.yaml new file mode 100644 index 0000000..6b3e731 --- /dev/null +++ b/updatecli/updatecli.d/update-upstream.yaml @@ -0,0 +1,63 @@ +--- +name: "Update upstream version" + +sources: + upstream: + name: Get upstream version + kind: githubrelease + spec: + owner: k8snetworkplumbingwg + repository: network-resources-injector + token: '{{ requiredEnv .github.token }}' + typefilter: + release: true + draft: false + prerelease: false + versionfilter: + kind: latest + +targets: + dockerfile: + name: 'Bump Dockerfile to upstream version {{ source "upstream" }}' + kind: dockerfile + scmid: default + sourceid: upstream + spec: + file: "Dockerfile" + instruction: + keyword: "ARG" + matcher: "TAG" + + makefile: + name: 'Bump Makefile to upstream version {{ source "upstream" }}' + kind: file + scmid: default + disablesourceinput: true + spec: + file: Makefile + matchpattern: '(?m)^TAG \:\= (.*)' + replacepattern: 'TAG := {{ source "upstream" }}$$(BUILD_META)' + +scms: + default: + kind: github + spec: + token: '{{ requiredEnv .github.token }}' + username: '{{ requiredEnv .github.username }}' + user: '{{ .github.user }}' + email: '{{ .github.email }}' + owner: '{{ .github.owner }}' + repository: '{{ .github.repository }}' + branch: '{{ .github.branch }}' + +actions: + default: + title: 'Bump to upstream version {{ source "upstream" }}' + kind: github/pullrequest + spec: + automerge: false + labels: + - chore + - skip-changelog + - status/auto-created + scmid: default