1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/.github/workflows/main.yml
Steve Richards 02882e1b15 Updated to set branch and tag values
Signed-off-by: Steve Richards <srichards@mirantis.com>
2021-05-24 14:29:25 +01:00

28 lines
1.0 KiB
YAML

name: Create Repository Dispatch request to lens-ide to publish docs
on:
push:
branches:
- master
release:
types:
- published
jobs:
issue-publish-docs:
name: Issue Repository Dispatch to publish docs
runs-on: ubuntu-latest
steps:
- name: Get the branch
if: contains(github.ref, 'refs/heads/master')
run: echo "BRANCH=master" >> $GITHUB_ENV
- name: Get the release version
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease
run: echo "TAG_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Dispatch initiating repository event
run: |
curl -X POST https://api.github.com/repos/lensapp/lens-ide/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.GH_TOKEN }} \
--data '{"event_type": "publish-docs", "client_payload": { "repository": "'"$GITHUB_REPOSITORY"'", "branch": "'"${{ env.BRANCH }}"'", "tag": "'"${{ env.TAG_VERSION }}"'" }}'