Skip to content
Merged
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
99 changes: 71 additions & 28 deletions .github/workflows/notify-dependents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,56 @@ on:
types:
- completed

permissions:
contents: read

jobs:
info:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
release_version: ${{ github.event.workflow_run.output.release_version }}
release_version: ${{ steps.release_version.outputs.release_version }}
steps:
- name: Display Release Version
- name: Resolve release version
id: release_version
env:
INPUT_RELEASE_VERSION: ${{ github.event.inputs.release_version }}
WORKFLOW_HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Release Version is ${{ github.event.workflow_run.output.release_version }}"
echo "::set-output name=release_version::${{ github.event.workflow_run.output.release_version }}"
echo "workflow_run.conclusion: ${{ github.event.workflow_run.conclusion }}"
echo "workflow_run.output.release_version: ${{ github.event.workflow_run.output.release_version }}"
echo "workflow_run.output: ${{ github.event.workflow_run.output }}"
set -eo pipefail

release_version="$INPUT_RELEASE_VERSION"

if [ -z "$release_version" ]; then
candidate="$WORKFLOW_HEAD_BRANCH"
if [[ "$candidate" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+ ]]; then
release_version="$candidate"
fi
fi

if [ -z "$release_version" ]; then
api_url="https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/latest"
tag_name=$(curl -sSf -H "Authorization: Bearer ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" "$api_url" | jq -r '.tag_name')
if [[ "$tag_name" != "null" && -n "$tag_name" ]]; then
release_version="$tag_name"
fi
fi

release_version="${release_version#v}"

if [ -z "$release_version" ]; then
echo "Release version could not be determined." >&2
exit 1
fi

echo "release_version=$release_version" >> "$GITHUB_OUTPUT"
echo "Resolved release version: $release_version"
bump-meshery:
runs-on: ubuntu-24.04
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release_version }}
needs: info
if: ${{ needs.info.outputs.release_version && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
env:
RELEASE_VERSION: ${{ needs.info.outputs.release_version }}
steps:
- name: Checkout Meshery code
uses: actions/checkout@v6
Expand All @@ -43,32 +77,35 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- name: Make changes to pull request
working-directory: ui
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release_version }}
run: npm install @sistent/sistent@${{ env.RELEASE_VERSION }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
commit-message: Update to Sistent v${{ github.event.workflow_run.output.release_version }} dependencies
commit-message: Update to Sistent v${{ env.RELEASE_VERSION }} 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]: Update to Sistent v${{ github.event.workflow_run.output.release_version }}'
title: '[Chore]: Update to Sistent v${{ env.RELEASE_VERSION }}'
add-paths: |
ui/package.json
ui/package-lock.json
body: |
Update to Sistent v${{ github.event.workflow_run.output.release_version }}
Update to Sistent v${{ env.RELEASE_VERSION }}

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

bump-meshery-extensions:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release_version }}
needs: info
if: ${{ needs.info.outputs.release_version && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
env:
RELEASE_VERSION: ${{ needs.info.outputs.release_version }}
steps:
- name: Checkout Meshery Extensions code
uses: actions/checkout@v6
Expand All @@ -83,32 +120,35 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- name: Make changes to pull request
working-directory: meshmap
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release_version }}
run: npm install @sistent/sistent@${{ env.RELEASE_VERSION }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
commit-message: Update to Sistent v${{ github.event.workflow_run.output.release_version }} dependencies
commit-message: Update to Sistent v${{ env.RELEASE_VERSION }} 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]: Update to Sistent v${{needs.versions-check.outputs.current }}'
title: '[Chore]: Update to Sistent v${{ env.RELEASE_VERSION }}'
add-paths: |
meshmap/package.json
meshmap/package-lock.json
body: |
Update to Sistent v${{ github.event.workflow_run.output.release_version }}
Update to Sistent v${{ env.RELEASE_VERSION }}

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

bump-layer5:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release_version }}
needs: info
if: ${{ needs.info.outputs.release_version && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
env:
RELEASE_VERSION: ${{ needs.info.outputs.release_version }}

steps:
- name: Checkout Layer5 code
Expand All @@ -123,32 +163,35 @@ jobs:
cache: "npm"
cache-dependency-path: '**/package-lock.json'
- name: Make changes to pull request
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release_version }} --legacy-peer-deps
run: npm install @sistent/sistent@${{ env.RELEASE_VERSION }} --legacy-peer-deps
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
commit-message: Bump sistent v${{ github.event.workflow_run.output.release_version }} dependencies
commit-message: Bump sistent v${{ env.RELEASE_VERSION }} 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]: Update to Sistent v${{ github.event.workflow_run.output.release_version }}'
title: '[Chore]: Update to Sistent v${{ env.RELEASE_VERSION }}'
add-paths: |
package.json
package-lock.json
body: |
Update to Sistent v${{ github.event.workflow_run.output.release_version }}
Update to Sistent v${{ env.RELEASE_VERSION }}

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

bump-meshery-cloud:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.output.release_version }}
needs: info
if: ${{ needs.info.outputs.release_version && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
env:
RELEASE_VERSION: ${{ needs.info.outputs.release_version }}
steps:
- name: Checkout Meshery Extensions code
uses: actions/checkout@v6
Expand All @@ -163,24 +206,24 @@ jobs:
cache-dependency-path: '**/package-lock.json'
- name: Make changes to pull request
working-directory: ui
run: npm install @sistent/sistent@${{ github.event.workflow_run.output.release_version }}
run: npm install @sistent/sistent@${{ env.RELEASE_VERSION }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GH_ACCESS_TOKEN }}
commit-message: Update to Sistent v${{ github.event.workflow_run.output.release_version }} dependencies
commit-message: Update to Sistent v${{ env.RELEASE_VERSION }} 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]: Update to Sistent v${{ github.event.workflow_run.output.release_version }}'
title: '[Chore]: Update to Sistent v${{ env.RELEASE_VERSION }}'
add-paths: |
ui/package.json
ui/package-lock.json
body: |
Update to Sistent v${{ github.event.workflow_run.output.release_version }}
Update to Sistent v${{ env.RELEASE_VERSION }}

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