Skip to content

Commit 8ba3ca7

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 4e2de46 + 24cab80 commit 8ba3ca7

File tree

3 files changed

+296
-0
lines changed

3 files changed

+296
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "Updatecli Golang"
2+
pipelineid: "golang/version"
3+
4+
scms:
5+
default:
6+
kind: githubsearch
7+
spec:
8+
search: "org:MyOrg"
9+
limit: 3
10+
branch: "^main$|^v2$"
11+
commitusingapi: true
12+
commitmessage:
13+
squash: true
14+
type: chore
15+
scope: deps
16+
title: "update Golang version"
17+
user: myGitCommitUsername
18+
email: myGitCommitEmail
19+
20+
actions:
21+
default:
22+
kind: github/pullrequest
23+
scmid: default
24+
spec:
25+
labels:
26+
- dependencies
27+
title: "update Golang version"
28+
usetitleforautomerge: true
29+
30+
autodiscovery:
31+
scmid: default
32+
actionid: default
33+
groupby: all
34+
crawlers:
35+
golang:
36+
onlygoversion: true
37+
versionfilter:
38+
kind: "semver"
39+
pattern: "1.24.x"
40+
dockerfile:
41+
digest: true
42+
only:
43+
- images:
44+
- "registry.suse.com/bci/golang"
45+
versionfilter:
46+
kind: semver
47+
pattern: "1.24.x"
48+
49+
sources:
50+
golang:
51+
name: Get the latest Golang version
52+
kind: golang
53+
spec:
54+
versionfilter:
55+
kind: semver
56+
pattern: "1.24.x"
57+
58+
targets:
59+
github-action:
60+
name: 'deps(github-action): Bump Golang version to {{ source "golang" }}'
61+
kind: yaml
62+
scmid: default
63+
spec:
64+
engine: yamlpath
65+
files:
66+
- ".github/workflows/*"
67+
key: '$.jobs.build.steps[?(@.uses =~ /^actions\/setup-go/)].with.go-version'
68+
searchpattern: true
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
---
2+
title: "Updatecli v0.110.0 Released: GitHub Search SCM, Git branch cleanup & Dockerfile matching, and More!"
3+
date: 2025-11-05T00:00:00+00:00
4+
draft: false
5+
weight: 50
6+
images: [""]
7+
contributors: ["olblak"]
8+
---
9+
10+
We’re excited to ship v0.110.0 — this release introduces a GitHub search SCM to target multiple repositories, improved Git branch handling (including optional cleanup of working branches), better Dockerfile matching behavior, and a handful of bug fixes and quality-of-life improvements.
11+
12+
## Highlights
13+
14+
- New `githubsearch` SCM kind to discover and operate on repositories matching a GitHub search query.
15+
- New `--clean-git-branches` flag to remove Updatecli working branches that have no divergent changes.
16+
- Git pushes are now collected and executed once (after all targets) to reduce CI noise and enable reliable branch cleanup.
17+
- Improved Dockerfile image matching (exact match instead of prefix).
18+
- Autodiscovery now supports GitHub composite actions.
19+
20+
---
21+
22+
## Git branch improvements
23+
24+
We changed when Updatecli pushes commits and added optional branch cleanup:
25+
26+
- Push behavior
27+
- Instead of pushing after each target, Updatecli now collects pushes and performs them once after all targets are processed and just before running actions. This reduces CI runs and groups related changes into a single push.
28+
- Benefits:
29+
- Only one push per pipeline run (less CI churn).
30+
- Easier to reason about leftover vs. newly created commits.
31+
- Enables reliable cleanup of transient working branches.
32+
33+
- Branch cleanup
34+
- New flag: `--clean-git-branches`
35+
- When enabled, Updatecli will remove working branches that did not diverge from the target change (useful to keep repositories tidy).
36+
- Example:
37+
38+
```bash
39+
updatecli apply --clean-git-branches=true
40+
```
41+
42+
- Note: Cleanup only runs if pushing is enabled and not in dry-run mode.
43+
44+
---
45+
46+
## GitHub search SCM: apply manifests to many repositories
47+
48+
We added an SCM kind `githubsearch` that generates SCM configurations from a GitHub search query. That allows running the same Updatecli manifest across many repositories discovered via GitHub's advanced search.
49+
50+
Example updatecli.yaml using `githubsearch`:
51+
52+
```yaml
53+
name: Update all Golang versions
54+
scms:
55+
default:
56+
kind: githubsearch
57+
spec:
58+
search: 'org:updatecli language:Go archived:false'
59+
limit: 0 # 0 = no limit
60+
branch: '^main$' # regex to match branch names
61+
62+
sources:
63+
golang:
64+
name: Get the latest Golang version
65+
kind: golang
66+
spec:
67+
versionfilter:
68+
kind: semver
69+
pattern: 1.23.x
70+
71+
targets:
72+
gomod:
73+
name: 'Update Golang version in go.mod to {{ source "golang" }}'
74+
kind: golang/gomod
75+
spec:
76+
file: go.mod
77+
78+
github-action:
79+
name: 'deps(github-action): Bump Golang version to {{ source "golang" }}'
80+
kind: yaml
81+
spec:
82+
engine: yamlpath
83+
files:
84+
- ".github/workflows/*"
85+
key: '$.jobs.build.steps[?(@.uses =~ /^actions\/setup-go/)].with.go-version'
86+
searchpattern: true
87+
```
88+
89+
Notes:
90+
91+
- `githubsearch` expands into multiple generated Git SCM entries at runtime. Use it carefully (limit, branch filters) to control scope.
92+
- This concept could be extended to other SCM providers (GitLab, Gitea); please open an issue if you need support for additional providers.
93+
- The branch filter uses regex syntax to match branch names.
94+
95+
---
96+
97+
## Autodiscovery: GitHub composite actions
98+
99+
Autodiscovery now recognizes and can update GitHub composite actions. Thanks to [Lois](https://github.com/loispostula) for this contribution.
100+
101+
If you aren’t familiar with composite actions, see GitHub’s docs:
102+
https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
103+
104+
---
105+
106+
## Bug fixes & small improvements
107+
108+
- Don’t require `query` + `versionFilter` with dasel/v2 in the JSON plugin — thanks [refi64](https://github.com/refi64).
109+
- Dockerfile image matching now uses exact match rather than prefix, preventing accidental updates of similar image names.
110+
- Correct target/condition IDs in missing-source errors — thanks [Shristy Chaudhary](https://github.com/srishtea-22).
111+
- Other small cleanups and stability fixes.
112+
113+
---
114+
115+
## Upgrade notes
116+
117+
- No breaking changes expected for typical manifests.
118+
- To enable branch cleanup, run with `--clean-git-branches=true` and ensure `--push` is enabled (and not in dry-run).
119+
120+
---
121+
122+
## Contributors
123+
124+
Thanks to everyone who contributed to this release:
125+
126+
- Lois (composite action autodiscovery)
127+
- refi64 (dasel v2 fixes)
128+
- Shristy Chaudhary (error message fix)
129+
- and all community contributors
130+
131+
---
132+
133+
If you hit any issue or have feedback, please open an issue on GitHub: https://github.com/updatecli/updatecli/issues
134+
135+
## How to Upgrade
136+
137+
Updatecli v0.109.0 is available now on [GitHub Releases](https://github.com/updatecli/updatecli/releases), Docker Hub, and as a Go binary.
138+
139+
```sh
140+
# Upgrade via Homebrew
141+
brew upgrade updatecli
142+
143+
# Or pull the latest Docker image
144+
docker pull ghcr.io/updatecli/updatecli:v0.110.0-slim
145+
```
146+
147+
More installation options can be found in our [Installation page](https://www.updatecli.io/docs/prologue/installation/).
148+
149+
---
150+
151+
## Feedback & Community
152+
153+
We love hearing from our users!
154+
If you have feedback, or want to share how you use Updatecli, join us on [GitHub Discussions](https://github.com/updatecli/updatecli/discussions) or [Chat](https://app.gitter.im/#/room/#Updatecli_community:gitter.im).
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: "Github Search"
3+
description: "Use GitHub search to interact with multiple github repositories"
4+
lead: "kind: githubsearch"
5+
date: 2025-10-23T20:21:01+02:00
6+
draft: false
7+
images: []
8+
menu:
9+
docs:
10+
parent: "plugin-scm"
11+
toc: true
12+
plugins:
13+
- scm
14+
---
15+
// <!-- Required for asciidoctor -->
16+
:toc:
17+
// Set toclevels to be at least your hugo [markup.tableOfContents.endLevel] config key
18+
:toclevels: 4
19+
20+
== Description
21+
22+
The GitHub Search SCM block allows you to interact with multiple GitHub repositories — either by fetching files or by pushing updates to them.
23+
24+
**condition**
25+
26+
When used in a condition, the SCM block typically fetches files or metadata from the specified repository
27+
28+
**target**
29+
30+
When used in a target, the SCM block usually pushes changes to that repository.
31+
32+
By default, the GitHub Search SCM uses the standard GitHub workflow: it creates a temporary branch, commits the changes, and opens a pull request targeting the branch defined in the configuration.
33+
34+
== Parameters
35+
36+
{{< resourceparameters "scms" "githubsearch" >}}
37+
38+
=== Authentication
39+
40+
include::content/en/docs/plugins/_githubAuth.adoc[]
41+
42+
=== CommitMessage
43+
44+
Updatecli uses conventional commits as describe on link:https://www.conventionalcommits.org/[www.conventionnalcommits.org]. +
45+
The goal is to add human and machine readable meaning to commit messages
46+
47+
By default, Updatecli generates a commit message using the default type "chore" and split long title message into the body like:
48+
49+
---
50+
```
51+
Author: olblak <updatecli@updatecli.io>
52+
Date: Tue May 4 15:41:44 2021 +0200
53+
54+
chore: Update key "dependencies[0].version" from file "charts/jenkins/r...
55+
56+
... equirements.yaml"
57+
58+
Made with ❤️️ by updatecli
59+
```
60+
---
61+
62+
== Example
63+
64+
This pipeline automatically updates the Golang version across multiple GitHub repositories within the MyOrg organization.
65+
Using the githubsearch SCM, it discovers repositories that match specific branch patterns (e.g., main or v2) and identifies where Golang versions are defined — such as in Go modules, Dockerfiles, or GitHub Actions workflows.
66+
67+
Updatecli then retrieves the latest matching Golang version (for example, any 1.24.x release) and opens pull requests that update these files accordingly. It will create one pull request on a temporary branch, following the GitHub workflow, and includes a consistent commit message and label for easy tracking and automated merging.
68+
It will squash all the changes into one commit.
69+
70+
[source,yaml]
71+
----
72+
# updatecli.yaml
73+
{{<include "assets/code_example/docs/plugins/scm/githubsearch/updatecli.d/commitmessage.yaml">}}
74+
----

0 commit comments

Comments
 (0)