Skip to content

Commit

Permalink
Merge pull request #39 from mgfritch/update-upstream
Browse files Browse the repository at this point in the history
Update to v1.6.0
  • Loading branch information
mgfritch authored Jun 20, 2024
2 parents 47889fb + d427127 commit 62d2a1c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
63 changes: 63 additions & 0 deletions updatecli/updatecli.d/update-upstream.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 62d2a1c

Please sign in to comment.