fixing wrong lines
[doc.git] / .github / workflows / gerrit-verify.yaml
1 ---
2 name: Gerrit Composed docs Verify
3
4 # yamllint disable-line rule:truthy
5 on:
6   workflow_dispatch:
7     inputs:
8       GERRIT_BRANCH:
9         description: "Branch that change is against"
10         required: true
11         type: string
12       GERRIT_CHANGE_ID:
13         description: "The ID for the change"
14         required: true
15         type: string
16       GERRIT_CHANGE_NUMBER:
17         description: "The Gerrit number"
18         required: true
19         type: string
20       GERRIT_CHANGE_URL:
21         description: "URL to the change"
22         required: true
23         type: string
24       GERRIT_EVENT_TYPE:
25         description: "Type of Gerrit event"
26         required: true
27         type: string
28       GERRIT_PATCHSET_NUMBER:
29         description: "The patch number for the change"
30         required: true
31         type: string
32       GERRIT_PATCHSET_REVISION:
33         description: "The revision sha"
34         required: true
35         type: string
36       GERRIT_PROJECT:
37         description: "Project in Gerrit"
38         required: true
39         type: string
40       GERRIT_REFSPEC:
41         description: "Gerrit refspec of change"
42         required: true
43         type: string
44
45 jobs:
46   prepare:
47     runs-on: ubuntu-latest
48     steps:
49       - name: Clear votes
50         # yamllint disable-line rule:line-length
51         uses: lfit/gerrit-review-action@6ac4c2322b68c0120a9b516eb0421491ee1b3fdf  # v0.4
52         with:
53           host: ${{ vars.GERRIT_SERVER }}
54           username: ${{ vars.GERRIT_SSH_USER }}
55           key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
56           known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
57           gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
58           gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
59           vote-type: clear
60       - name: Allow replication
61         run: sleep 10s
62
63   vote:
64     if: ${{ always() }}
65     # Vote just needs prepare to basically execute a noop action
66     # Noop action allows +1 Verified vote on changes which is required to make changes submittable
67     needs: [prepare]
68     runs-on: ubuntu-latest
69     steps:
70       - name: Get conclusion
71         # yamllint disable-line rule:line-length
72         uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5  # v3.0.3
73       - name: Set vote
74         # yamllint disable-line rule:line-length
75         uses: lfit/gerrit-review-action@6ac4c2322b68c0120a9b516eb0421491ee1b3fdf  # v0.4
76         with:
77           host: ${{ vars.GERRIT_SERVER }}
78           username: ${{ vars.GERRIT_SSH_USER }}
79           key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
80           known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
81           gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
82           gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
83           vote-type: ${{ env.WORKFLOW_CONCLUSION }}