Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 810828f

Browse files
author
Sameer Naik
authored
Merge pull request #82 from triggermesh/update-tm-manifests
ci: update the image version in tm/triggermesh manifests on releases
2 parents 1273282 + 1b96fc8 commit 810828f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,47 @@ jobs:
6565
tags: ${{ steps.meta.outputs.tags }}
6666
labels: ${{ steps.meta.outputs.labels }}
6767

68+
update-manifests:
69+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
70+
name: Update TriggerMesh Manifests
71+
runs-on: ubuntu-latest
72+
needs: publish-images
73+
steps:
74+
75+
- name: Checkout
76+
uses: actions/checkout@v3
77+
78+
- name: Checkout triggermesh/triggermesh
79+
uses: actions/checkout@v3
80+
with:
81+
path: 'tm-triggermesh'
82+
ref: 'main'
83+
repository: 'triggermesh/triggermesh'
84+
token: ${{ secrets.TM_TRIGGERMESH_TOKEN }}
85+
86+
- name: Prepare updates
87+
working-directory: tm-triggermesh
88+
run: |
89+
RUNTIMES=$(sed -n -e "s/^\(RUNTIMES[[:space:]]*=[[:space:]]*\)\(.*\)$/\2/p" ../Makefile)
90+
echo $RUNTIMES
91+
for runtime in ${RUNTIMES}; do
92+
sed -i config/500-controller.yaml -e "s|gcr.io/triggermesh/knative-lambda-${runtime##*/}:.*|gcr.io/triggermesh/knative-lambda-${runtime##*/}:"${GITHUB_REF_NAME}"|g"
93+
done
94+
95+
git --no-pager diff
96+
97+
- name: Commit and push changes
98+
working-directory: tm-triggermesh
99+
run: |
100+
git add -A
101+
git status --porcelain
102+
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
103+
git config --global user.name 'TriggerMesh Bot'
104+
git config --global user.email '[email protected]'
105+
git commit -m "Update function runtime to release '${GITHUB_REF_NAME}'"
106+
git push
107+
fi
108+
68109
create-release:
69110
name: Create Release
70111
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')

0 commit comments

Comments
 (0)