Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input and workflow dispatch #791

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions .github/workflows/bump-meshery-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,36 @@ name: Bump Meshery, Meshery Extensions and Meshery Cloud
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag to bump to (defaults to latest if empty)'
required: false
type: string

jobs:
get-release-tag:
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.set_tag.outputs.tag }}
steps:
- name: Set release tag
id: set_tag
run: |
if [ -n "${{ github.event.release.tag_name }}" ]; then
# tag from release event
echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
elif [ -n "${{ inputs.release_tag }}" ]; then
# input tag in workflow dispatch
echo "tag=${{ github.event.inputs.release_tag }}" >> $GITHUB_OUTPUT
else
# Fetch latest published release tag
TAG=$(curl -L -s https://github.com/layer5io/sistent/releases/latest | grep -oP 'releases/tag/\K[^"]+' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
echo "tag=${TAG}" >> $GITHUB_OUTPUT
fi

bump-meshery:
needs: get-release-tag
runs-on: ubuntu-latest
steps:
- name: Checkout Meshery code
Expand All @@ -27,22 +54,23 @@ jobs:
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.RELEASEDRAFTER_PAT }}
commit-message: Bump sistent ${{ github.event.release.tag_name }} dependencies
commit-message: Bump sistent ${{ needs.get-release-tag.outputs.release_tag }} dependencies
committer: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: bump-sistent-bot
delete-branch: true
title: '[Chore]: Bump ${{ github.event.release.name }}'
title: '[Chore]: Bump sistent ${{ needs.get-release-tag.outputs.release_tag }}'
add-paths: |
ui/package.json
ui/package-lock.json
body: |
Update to Sistent ${{ github.event.release.tag_name }}
Update to Sistent ${{ needs.get-release-tag.outputs.release_tag }}

_This pull request has been auto-generated by [l5io](http://github.com/l5io)_
assignees: l5io
draft: false

bump-meshery-extensions:
runs-on: ubuntu-latest
steps:
Expand Down
Loading