Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(updatecli): add a manifest for golang #982

Merged
merged 5 commits into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions updatecli/updatecli.d/golang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Bump golang version

scms:
default:
kind: github
spec:
user: "{{ .github.user }}"
email: "{{ .github.email }}"
owner: "{{ .github.owner }}"
repository: "{{ .github.repository }}"
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
branch: "{{ .github.branch }}"

sources:
getGolangVersion:
kind: githubrelease
spec:
owner: golang
repository: go
token: "{{ requiredEnv .github.token }}"
username: "{{ .github.username }}"
versionfilter:
kind: regex
## Latest stable 1.x.y version
pattern: 'go1\.(\d*)\.(\d*)$'
transformers:
- trimprefix: go

targets:
updateVersion:
name: "Update the `Golang` version in the tools-versions.yml file"
sourceid: getGolangVersion
kind: yaml
spec:
file: "provisioning/tools-versions.yml"
key: "golang_version"
scmid: default
updateVersionInGoss:
name: Update the `Golang` version in the goss test
kind: yaml
spec:
files:
- goss/goss-linux.yaml
key: $.command.golang.stdout[0]
scmid: default

actions:
default:
kind: github/pullrequest
title: Bump Golang version to {{ source "getGolangVersion" }}
scmid: default
spec:
labels:
- dependency
- golang