diff --git a/.github/workflows/release-clients.yml b/.github/workflows/release-clients.yml index c3447a2..bf098d3 100644 --- a/.github/workflows/release-clients.yml +++ b/.github/workflows/release-clients.yml @@ -24,3 +24,10 @@ jobs: gh release create v${{github.event.inputs.version}} ${{github.event.inputs.options}} --title ${{github.event.inputs.version}} --repo regulaforensics/DocumentReader-web-csharp-client env: GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} + + - name: Repository Dispatch + uses: peter-evans/repository-dispatch@v3 + with: + event-type: release-web-page + client-payload: '{"version": "${{github.event.inputs.version}}", "success": true}' + if: ${{ success() }} diff --git a/.github/workflows/release-web-page.yml b/.github/workflows/release-web-page.yml index 97b9330..0d88676 100644 --- a/.github/workflows/release-web-page.yml +++ b/.github/workflows/release-web-page.yml @@ -1,18 +1,28 @@ name: release web page on: - push: - branches: - - master + repository_dispatch: + types: [release-web-page] + jobs: build-and-push: + if: ${{ github.event.client_payload.success }} runs-on: ubuntu-20.04 steps: - name: Checkout Specifications uses: actions/checkout@v2 with: path: 'master-branch' + + - name: Install yq + uses: vegardit/gha-setup-yq@v1 + with: + version: 4.44.2 + + - name: Replace index.yml version + run: yq -i ".info.version =\"${{ github.event.client_payload.version }}\"" index.yml + - name: Install redoc-cli uses: actions/setup-node@v1 with: @@ -46,4 +56,10 @@ jobs: git commit -m "update pages" git push origin gh-pages env: - GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} + + - name: Pushing tag to Repo + uses: thejeff77/action-push-tag@v1.0.0 + with: + tag: v${{ github.event.client_payload.version }} + if: ${{ success() }}