Skip to content

Commit 4ea8761

Browse files
Merge pull request #124 from rhobs/acm_217
Update Syncbot Actions for ACM 2.17
2 parents 0223504 + 5705aea commit 4ea8761

10 files changed

Lines changed: 23 additions & 132 deletions

.github/workflows/acm-konflux-update-pr.yaml

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/merge-acm-alertmanager.yaml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM Alertmanager merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -20,22 +20,11 @@ jobs:
2020
upstream: prometheus/alertmanager
2121
downstream: stolostron/prometheus-alertmanager
2222
sandbox: rhobs/acm-prometheus-alertmanager
23-
go-version: "1.25"
2423
restore-upstream: >-
2524
CHANGELOG.md
2625
VERSION
2726
go.mod
2827
go.sum
29-
assets-cmd: |
30-
# Only compress assets if assets actually changed
31-
# The git diff relies on gits remote naming. The merge-flow checks out
32-
# $downstream as origin at the time of writing this code.
33-
if ! git diff --exit-code origin/master ui/react-app; then
34-
make assets-compress
35-
find ui/react-app -type f -name '*.gz' -exec git add {} \;
36-
git add ui/react-app/embed.go
37-
git diff --cached --exit-code || git commit -s -m "[bot] assets: generate"
38-
fi
3928
4029
secrets:
4130
pr-app-id: ${{ secrets.ACM_APP_ID }}

.github/workflows/merge-acm-flow.yaml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
default: '22'
88
required: false
99
type: string
10-
go-version:
11-
description: go version
12-
required: true
13-
type: string
1410
upstream:
1511
description: Upstream repo path in owner/repo format
1612
required: true
@@ -137,12 +133,12 @@ jobs:
137133
repository: ${{ inputs.downstream }}
138134
fetch-depth: 0
139135
ref: ${{ inputs.downstream-branch }}
140-
- name: Fetch all upstream tags
136+
- name: Fetch upstream tag
141137
run: |
142138
git config user.name 'github-actions[bot]'
143139
git config user.email 'github-actions[bot]@users.noreply.github.com'
144140
git config --global core.editor "/bin/true"
145-
git fetch https://github.com/${{ inputs.upstream }} --tags
141+
git fetch --no-tags https://github.com/${{ inputs.upstream }} tag ${{ steps.upstream.outputs.release }}
146142
- name: Merge with upstream ${{ steps.upstream.outputs.release }} tag
147143
id: merge
148144
run: |
@@ -166,10 +162,12 @@ jobs:
166162
- name: Resolve conflict due to deleted downstream files
167163
if: ${{ steps.merge.outputs.MERGE_CONFLICT == 'true' }}
168164
run: |
169-
git status --porcelain | awk '{ if ($1=="DU") print $2 }' | xargs -I {} git rm {}
165+
git status --porcelain | awk '{ if ($1=="UD" || $1=="DU") print $2 }' | xargs -I {} git rm {}
170166
- name: Continue after merge conflict
171167
if: ${{ steps.merge.outputs.MERGE_CONFLICT == 'true' }}
172-
run: git merge --continue
168+
run: |
169+
git add -A
170+
git merge --continue
173171
- name: Add or update VERSION file
174172
run: |
175173
# All tags use the vX.Y.Z format currently.
@@ -191,7 +189,7 @@ jobs:
191189
git diff --cached --exit-code || git commit -s -m "[bot] add VERSION file with ${version_from_tag}"
192190
- uses: actions/setup-go@v5
193191
with:
194-
go-version: ${{ inputs.go-version }}
192+
go-version-file: go.mod
195193
- uses: actions/setup-node@v4
196194
with:
197195
node-version: ${{ inputs.node-version }}
@@ -242,11 +240,6 @@ jobs:
242240
go mod tidy
243241
go mod vendor
244242
${{ inputs.assets-cmd }}
245-
if [ -f scripts/rh-manifest.sh ]; then
246-
bash scripts/rh-manifest.sh
247-
git add rh-manifest.txt
248-
git diff --cached --exit-code || git commit -s -m "[bot] update rh-manifest.txt"
249-
fi
250243
```
251244
author: 'github-actions[bot]<github-actions[bot]@users.noreply.github.com>'
252245
committer: 'github-actions[bot]<github-actions[bot]@users.noreply.github.com>'

.github/workflows/merge-acm-grafana.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM Grafana merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -19,7 +19,6 @@ jobs:
1919
upstream: grafana/grafana
2020
downstream: stolostron/grafana
2121
sandbox: rhobs/acm-grafana
22-
go-version: "1.25"
2322
node-version: "22"
2423
go-mod-tidy: false
2524
restore-downstream: >-
@@ -58,10 +57,10 @@ jobs:
5857
go run ./pkg/build/wire/cmd/wire/main.go gen -tags oss ./pkg/server
5958
6059
# Commit assets
61-
git add pkg/server/wire_gen.go ./public/build ./public/app/plugins/datasource/*/dist/*
62-
git diff --cached --exit-code || git commit -s -m "[bot] assets: generate"
60+
git add pkg/server/wire_gen.go ./public/build ./public/app/plugins
61+
git diff --cached --exit-code --name-only || git commit -s -m "[bot] assets: generate"
6362
downstream-version-expression: |
64-
sed -n -E 's/^.*\"version\": *\"([0-9]+\.[0-9]+\.[0-9]+)\".*$/v\1/p' https://raw.githubusercontent.com/stolostron/grafana/release-2.12/package.json
63+
sed -n -E 's/^.*\"version\": *\"([0-9]+\.[0-9]+\.[0-9]+)\".*$/v\1/p' https://raw.githubusercontent.com/stolostron/grafana/release-2.17/package.json
6564
secrets:
6665
pr-app-id: ${{ secrets.ACM_APP_ID }}
6766
pr-app-private-key: ${{ secrets.ACM_APP_PRIVATE_KEY }}

.github/workflows/merge-acm-kube-state-metrics.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM kube-state-metrics merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -20,7 +20,6 @@ jobs:
2020
upstream: kubernetes/kube-state-metrics
2121
downstream: stolostron/kube-state-metrics
2222
sandbox: rhobs/acm-kube-state-metrics
23-
go-version: "1.25"
2423
restore-upstream: >-
2524
CHANGELOG.md
2625
restore-downstream: >-

.github/workflows/merge-acm-memcached-exporter.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM Memcached exporter merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -19,7 +19,6 @@ jobs:
1919
upstream: prometheus/memcached_exporter
2020
downstream: stolostron/memcached_exporter
2121
sandbox: rhobs/acm-memcached_exporter
22-
go-version: "1.25"
2322
restore-downstream: >-
2423
OWNERS
2524
restore-upstream: >-

.github/workflows/merge-acm-node-exporter.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM Node exporter merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -19,7 +19,6 @@ jobs:
1919
upstream: prometheus/node_exporter
2020
downstream: stolostron/node-exporter
2121
sandbox: rhobs/acm-node-exporter
22-
go-version: "1.25"
2322
restore-downstream: >-
2423
OWNERS
2524
restore-upstream: >-

.github/workflows/merge-acm-prometheus-operator.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM Prometheus Operator merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -19,7 +19,6 @@ jobs:
1919
upstream: prometheus-operator/prometheus-operator
2020
downstream: stolostron/prometheus-operator
2121
sandbox: rhobs/acm-prometheus-operator
22-
go-version: "1.25"
2322
restore-upstream: >-
2423
CHANGELOG.md
2524
Documentation

.github/workflows/merge-acm-prometheus.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM Prometheus merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -19,12 +19,13 @@ jobs:
1919
upstream: prometheus/prometheus
2020
downstream: stolostron/prometheus
2121
sandbox: rhobs/acm-prometheus
22-
go-version: "1.25"
22+
go-mod-tidy: false
2323
restore-downstream: >-
2424
plugins.yml
2525
plugins
2626
restore-upstream: >-
2727
CHANGELOG.md
28+
Makefile
2829
VERSION
2930
go.mod
3031
go.sum
@@ -33,11 +34,10 @@ jobs:
3334
# Only compress assets if assets actually changed
3435
# The git diff relies on gits remote naming. The merge-flow checks out
3536
# $downstream as origin at the time of writing this code.
36-
if ! git diff --exit-code origin/main web/ui; then
37-
make assets-compress
37+
if ! git diff --exit-code --name-only origin/main web/ui; then
3838
find web/ui/static -type f -name '*.gz' -exec git add {} \;
39-
git add web/ui/embed.go
40-
git diff --cached --exit-code || git commit -s -m "[bot] assets: generate"
39+
git add web/ui
40+
git diff --cached --exit-code --name-only || git commit -s -m "[bot] assets: generate"
4141
fi
4242
4343
secrets:

.github/workflows/merge-acm-thanos.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: ACM Thanos merger
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '0 0 * * 1' #@weekly
6+
- cron: '0 0 1,15 * *' #@biweekly
77
pull_request:
88
paths:
99
- '.github/workflows/merge-acm-flow.yaml'
@@ -19,7 +19,6 @@ jobs:
1919
upstream: thanos-io/thanos
2020
downstream: stolostron/thanos
2121
sandbox: rhobs/acm-thanos
22-
go-version: "1.25"
2322
restore-downstream: >-
2423
OWNERS
2524
restore-upstream: >-

0 commit comments

Comments
 (0)