@@ -10,36 +10,12 @@ jobs:
10
10
runs-on : ubuntu-latest
11
11
12
12
steps :
13
- # Determine the build branch and draft branch for dispatch.
14
- - name : Determine Dispatch Parameters
15
- run : |
16
- if [ "${{ github.event_name }}" == "pull_request" ]; then
17
- # If this workflow is kicked off by a pull request, build
18
- # a draft using the pull request base branch and PR branch.
19
- build_branch="${{ github.base_ref }}"
20
- draft_branch="${{ github.event.pull_request.head.ref }}"
21
- else
22
- if [ "$(basename ${{ github.event.ref }})" == "stage" ]; then
23
- # This was a merge to stage so kick off a build to update stage draft.
24
- build_branch=stage
25
- draft_branch=stage
26
- else
27
- # Otherwise this is a push to one of the source branches so
28
- # dispatch a build for the main draft to pick up the changes.
29
- build_branch=main
30
- draft_branch=main
31
- fi
32
- fi
33
- echo "build_branch=$build_branch" >> $GITHUB_OUTPUT
34
- echo "draft_branch=$draft_branch" >> $GITHUB_OUTPUT
35
- id : branches
36
-
37
13
- name : Deploy Draft
38
- uses : convictional/trigger-workflow-and-wait@v1.6.1
14
+ uses : convictional/trigger-workflow-and-wait@v1.6.5
39
15
with :
40
16
owner : riptano
41
17
repo : datastax-docs-site
42
18
github_token : ${{ secrets.DISPATCH_GITHUB_TOKEN }}
43
19
github_user : ${{ secrets.DISPATCH_GITHUB_USER }}
44
20
workflow_file_name : deploy-draft.yml
45
- client_payload : ' { "build_repository": "${{ github.event.repository.full_name }}", "build_branch": "${{ steps.branches.outputs.build_branch }}", "draft_branch": "${{ steps.branches.outputs.draft_branch }}", "pull_request_number": "${{ github.event.pull_request.number }}" }'
21
+ client_payload : ' { "build_repository": "${{ github.event.repository.full_name }}", "build_branch": "${{ github.base_ref }}", "draft_branch": "${{ github.event.pull_request.head.ref }}", "pull_request_number": "${{ github.event.pull_request.number }}" }'
0 commit comments