Skip to content

Commit cb59c53

Browse files
openshift-pipelines-botpramodbindal
authored andcommitted
[bot:main] update konflux configuration
1 parent b41a263 commit cb59c53

File tree

4 files changed

+38
-123
lines changed

4 files changed

+38
-123
lines changed

.github/workflows/auto-merge-upstream-release-v1.20.x.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,45 @@
11
# Generated for Konflux Application openshift-pipelines-cli by openshift-pipelines/hack. DO NOT EDIT
2-
name: auto-merge-upstream-tektoncd-cli
3-
2+
name: auto-merge-upstream-tektoncd/cli
43
on:
54
workflow_dispatch: {}
65
schedule:
7-
- cron: "*/30 * * * *" # At every 30 minutes
6+
- cron: "0,30 * * * *"
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
810

911
jobs:
10-
auto-approve:
12+
collect-branches:
1113
runs-on: ubuntu-latest
12-
permissions:
13-
pull-requests: write
14+
outputs:
15+
matrix: ${{ steps.set-matrix.outputs.matrix }}
1416
steps:
15-
- name: Checkout the current repo
16-
uses: actions/checkout@v4
17-
- name: auto-merge-upstream-tektoncd-cli
18-
run: |
19-
gh auth status
20-
git config user.name openshift-pipelines-bot
21-
git config user.email pipelines-extcomm@redhat.com
22-
# Approve and merge pull-request with no reviews
23-
for p in $(gh pr list --search "head:actions/update/sources-tektoncd-cli" --json "number" | jq ".[].number"); do
24-
gh pr merge --rebase --delete-branch --auto $p
25-
done
26-
env:
27-
GH_TOKEN: ${{ secrets.OPENSHIFT_PIPELINES_ROBOT }}
28-
17+
- name: Get branches matching pattern
18+
id: set-matrix
19+
run: |
20+
# List all branches and filter
21+
branches=$(gh api repos/${{ github.repository }}/branches --paginate -q '.[] | .name' | grep -E '^(release-v.*\.x$|next$)')
22+
echo "Found branches:"
23+
echo "$branches"
24+
# Convert to JSON array for matrix
25+
json=$(jq -nc --argjson arr "$(printf '%s\n' "$branches" | jq -R . | jq -s .)" '{branch: $arr}')
26+
echo "Matrix JSON: $json"
27+
echo "matrix=$json" >> $GITHUB_OUTPUT
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
auto-merge-upstream-all:
31+
needs: collect-branches
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
matrix: ${{ fromJSON(needs.collect-branches.outputs.matrix) }}
36+
steps:
37+
- name: Trigger auto-merge-upstream for ${{ matrix.branch }}
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
run: |
41+
echo Triggering workflow for branch: ${{ matrix.branch }}
42+
43+
gh workflow run "auto-merge-upstream.yaml" \
44+
--ref ${{ matrix.branch }} \
45+
--repo ${{ github.repository }}

.github/workflows/update-sources-release-v1.20.x.yaml

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

.github/workflows/update-sources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated for Konflux Application openshift-pipelines-cli by openshift-pipelines/hack. DO NOT EDIT
2-
name: update-sources-tektoncd-cli
2+
name: update-sources-tektoncd/cli
33
on:
44
workflow_dispatch: {}
55
schedule:

0 commit comments

Comments
 (0)