Skip to content

Commit 5dfea2e

Browse files
infernus01tekton-robot
authored andcommitted
fix: update-tektoncd-task-versions workflow to resolve CI failures
Signed-off-by: Shubham Bhardwaj <shubbhar@redhat.com>
1 parent f2f55b4 commit 5dfea2e

2 files changed

Lines changed: 10 additions & 31 deletions

File tree

.github/workflows/update-tektoncd-task-versions.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- cron: "0 0 * * *" # Runs daily at midnight
66
workflow_dispatch: {} # Allows manual trigger
77

8+
permissions: {}
9+
810
jobs:
911
update-task-versions:
1012
runs-on: ubuntu-latest
@@ -16,51 +18,31 @@ jobs:
1618
- name: Checkout Operator Repository
1719
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1820
with:
19-
fetch-depth: 0
2021
persist-credentials: false
2122

2223
- name: Clone TektonCD Catalog (p branch)
2324
run: |
2425
git clone --branch p https://github.com/openshift-pipelines/tektoncd-catalog.git ../tektoncd-catalog
2526
2627
- name: Update Task Versions
27-
id: update
28-
run: |
29-
./hack/openshift/update-openshift-tekton-task-versions.sh \
30-
--catalog-path ../tektoncd-catalog \
31-
--script-path hack/openshift/fetch-tektoncd-catalog-tasks.sh
32-
echo "has_changes=$(git diff --name-only | grep -q fetch-tektoncd-catalog-tasks.sh && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
33-
34-
- name: Set up Git config
35-
if: steps.update.outputs.has_changes == 'true'
36-
run: |
37-
git config user.name "tekton-robot"
38-
git config user.email "dlorenc+tekton@google.com"
39-
40-
- name: Commit Changes
41-
if: steps.update.outputs.has_changes == 'true'
42-
run: |
43-
git add hack/openshift/fetch-tektoncd-catalog-tasks.sh
44-
if ! git diff --cached --quiet; then
45-
git commit -m "Update Tekton task versions"
46-
else
47-
echo "No changes to commit. Skipping."
48-
fi
28+
run: ./hack/openshift/update-openshift-tekton-task-versions.sh
4929

5030
- name: Create Pull Request
51-
if: steps.update.outputs.has_changes == 'true'
5231
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
5332
with:
54-
token: ${{ secrets.GITHUB_TOKEN }}
33+
token: ${{ secrets.CHATOPS_TOKEN }}
5534
commit-message: "Update Tekton task versions"
56-
committer: Shubham Bhardwaj <shubbhar@redhat.com>
35+
committer: tekton-bot <tekton-bot@users.noreply.github.com>
5736
author: Shubham Bhardwaj <shubbhar@redhat.com>
37+
signoff: true
5838
title: "Update Tekton task versions"
5939
body: |
6040
This PR automatically updates the task versions in the `fetch-tektoncd-catalog-tasks.sh` script.
6141
6242
The versions are pulled from the latest available versions in the [tektoncd-catalog](https://github.com/openshift-pipelines/tektoncd-catalog) repository.
6343
branch: update-tekton-versions
6444
base: main
65-
labels: automation
45+
labels: |
46+
automation
47+
release-note-none
6648
delete-branch: true

hack/openshift/update-openshift-tekton-task-versions.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,10 @@ FETCH_SCRIPT="hack/openshift/fetch-tektoncd-catalog-tasks.sh"
66

77
# Check if the tektoncd-catalog repo exists
88
if [[ ! -d "$TEKTON_CATALOG_DIR" ]]; then
9-
echo "Error: tektoncd-catalog repo is missing! Clone it first."
9+
echo "Error: tektoncd-catalog repo is missing! Clone it first." >&2
1010
exit 1
1111
fi
1212

13-
# Backup the original fetch script before modifying
14-
cp "$FETCH_SCRIPT" "$FETCH_SCRIPT.bak"
15-
1613
# Track if any updates were made
1714
updated=false
1815

0 commit comments

Comments
 (0)