1919 ref : main
2020 fetch-depth : 0
2121
22- - name : Detect and replace tag in .tekton yamls
22+ - name : Detect and replace tags in .tekton and params-latest.env files
2323 id : replace
2424 run : |
2525 set -e
3737 echo "Found previous tag: $prev_tag"
3838 echo "Replacing $prev_tag -> $new_tag"
3939
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
4146
4247 # Export previous tag for later steps
4348 echo "previous_tag=$prev_tag" >> $GITHUB_OUTPUT
5863 fi
5964
6065 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}"
6368 git push origin "$branch"
6469 echo "branch=$branch" >> $GITHUB_OUTPUT
6570
@@ -69,13 +74,13 @@ jobs:
6974 prev_tag="${{ steps.replace.outputs.previous_tag }}"
7075 new_tag="${{ github.event.inputs.new_tag }}"
7176
72- body=":rocket: Automated Tekton Image tag update.
77+ body=":rocket: Automated Tekton + params-latest.env image tag update.
7378 - Updated from \`${prev_tag}\` → \`${new_tag}\`
7479 - Created by \`.github/workflows/update-tekton-tags.yaml\`"
7580
7681 gh pr create \
7782 --repo "$GITHUB_REPOSITORY" \
78- --title "chore: update Tekton Image tag ${prev_tag} → ${new_tag}" \
83+ --title "chore: update image tags ${prev_tag} → ${new_tag}" \
7984 --body "$body" \
8085 --head "$branch" \
8186 --base main
0 commit comments