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

Commit

Permalink
ci: update the image version in tm/triggermesh manifests on releases
Browse files Browse the repository at this point in the history
  • Loading branch information
sameersbn committed Apr 3, 2023
1 parent 1273282 commit 1b96fc8
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,47 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

update-manifests:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
name: Update TriggerMesh Manifests
runs-on: ubuntu-latest
needs: publish-images
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Checkout triggermesh/triggermesh
uses: actions/checkout@v3
with:
path: 'tm-triggermesh'
ref: 'main'
repository: 'triggermesh/triggermesh'
token: ${{ secrets.TM_TRIGGERMESH_TOKEN }}

- name: Prepare updates
working-directory: tm-triggermesh
run: |
RUNTIMES=$(sed -n -e "s/^\(RUNTIMES[[:space:]]*=[[:space:]]*\)\(.*\)$/\2/p" ../Makefile)
echo $RUNTIMES
for runtime in ${RUNTIMES}; do
sed -i config/500-controller.yaml -e "s|gcr.io/triggermesh/knative-lambda-${runtime##*/}:.*|gcr.io/triggermesh/knative-lambda-${runtime##*/}:"${GITHUB_REF_NAME}"|g"
done
git --no-pager diff
- name: Commit and push changes
working-directory: tm-triggermesh
run: |
git add -A
git status --porcelain
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
git config --global user.name 'TriggerMesh Bot'
git config --global user.email 'bot@triggermesh.com'
git commit -m "Update function runtime to release '${GITHUB_REF_NAME}'"
git push
fi
create-release:
name: Create Release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
Expand Down

0 comments on commit 1b96fc8

Please sign in to comment.