19
19
ref : main
20
20
fetch-depth : 0
21
21
22
- - name : Detect and replace tag in .tekton yamls
22
+ - name : Detect and replace tags in .tekton and params-latest.env files
23
23
id : replace
24
24
run : |
25
25
set -e
37
37
echo "Found previous tag: $prev_tag"
38
38
echo "Replacing $prev_tag -> $new_tag"
39
39
40
- find .tekton -type f -name "*.yaml" -print0 | xargs -0 -I{} perl -0777 -i -pe "s/\Q$prev_tag\E/$new_tag/g" "{}"
40
+ # Update Tekton yamls
41
+ find .tekton -type f -name "*.yaml" -print0 | \
42
+ xargs -0 -I{} perl -0777 -i -pe "s/\Q$prev_tag\E/$new_tag/g" "{}"
43
+
44
+ # Update params-latest.env
45
+ perl -pi -e "s/\Q$prev_tag\E/$new_tag/g" manifests/base/params-latest.env
41
46
42
47
# Export previous tag for later steps
43
48
echo "previous_tag=$prev_tag" >> $GITHUB_OUTPUT
58
63
fi
59
64
60
65
git checkout -b "$branch"
61
- git add .tekton/*.yaml
62
- git commit -m "chore: update tekton tag from ${prev_tag} to ${new_tag}"
66
+ git add .tekton/*.yaml manifests/base/params-latest.env
67
+ git commit -m "chore: update tags from ${prev_tag} to ${new_tag}"
63
68
git push origin "$branch"
64
69
echo "branch=$branch" >> $GITHUB_OUTPUT
65
70
@@ -69,13 +74,13 @@ jobs:
69
74
prev_tag="${{ steps.replace.outputs.previous_tag }}"
70
75
new_tag="${{ github.event.inputs.new_tag }}"
71
76
72
- body=":rocket: Automated Tekton Image tag update.
77
+ body=":rocket: Automated Tekton + params-latest.env image tag update.
73
78
- Updated from \`${prev_tag}\` → \`${new_tag}\`
74
79
- Created by \`.github/workflows/update-tekton-tags.yaml\`"
75
80
76
81
gh pr create \
77
82
--repo "$GITHUB_REPOSITORY" \
78
- --title "chore: update Tekton Image tag ${prev_tag} → ${new_tag}" \
83
+ --title "chore: update image tags ${prev_tag} → ${new_tag}" \
79
84
--body "$body" \
80
85
--head "$branch" \
81
86
--base main
0 commit comments