Skip to content

JSON trigger for Valkey Extension Automation #64

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

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from
Open
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
39 changes: 39 additions & 0 deletions .github/workflows/trigger-json-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Trigger Extension Update - JSON

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: Version of Valkey JSON module that was released
required: true

jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Determine version
id: determine-vars
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
echo "Triggered by a release event."
VERSION=${{ github.event.release.tag_name }}
else
echo "Triggered manually."
VERSION=${{ inputs.version }}
fi

echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Trigger extension update
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.EXTENSION_PAT }}
repository: ${{ github.repository_owner }}/valkey-extensions
event-type: json-release
client-payload: >
{
"version": "${{ steps.determine-vars.outputs.version }}",
"module": "json"
}