diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:40:55 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 22:40:55 +0100 |
| commit | 5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda (patch) | |
| tree | 1acdfa5220cd13b7be43a2a01368e80d306473ca /examples/redis-unstable/.github/workflows/redis_docs_sync.yaml | |
| parent | c7ab12bba64d9c20ccd79b132dac475f7bc3923e (diff) | |
| download | crep-5d8dfe892a2ea89f706ee140c3bdcfd89fe03fda.tar.gz | |
Add Redis source code for testing
Diffstat (limited to 'examples/redis-unstable/.github/workflows/redis_docs_sync.yaml')
| -rw-r--r-- | examples/redis-unstable/.github/workflows/redis_docs_sync.yaml | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/redis-unstable/.github/workflows/redis_docs_sync.yaml b/examples/redis-unstable/.github/workflows/redis_docs_sync.yaml new file mode 100644 index 0000000..508b883 --- /dev/null +++ b/examples/redis-unstable/.github/workflows/redis_docs_sync.yaml @@ -0,0 +1,35 @@ +name: redis_docs_sync + +on: + release: + types: [published] + +jobs: + redis_docs_sync: + if: github.repository == 'redis/redis' + runs-on: ubuntu-latest + steps: + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.DOCS_APP_ID }} + private-key: ${{ secrets.DOCS_APP_PRIVATE_KEY }} + + - name: Invoke workflow on redis/docs + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} + RELEASE_NAME: ${{ github.event.release.tag_name }} + run: | + LATEST_RELEASE=$( + curl -Ls \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${GH_TOKEN}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/redis/redis/releases/latest \ + | jq -r '.tag_name' + ) + + if [[ "${LATEST_RELEASE}" == "${RELEASE_NAME}" ]]; then + gh workflow run -R redis/docs redis_docs_sync.yaml -f release="${RELEASE_NAME}" + fi |
