-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
32 lines (32 loc) · 1.08 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: "Vote on gerrit change"
inputs:
auth:
description: Gerrit HTTP password credentials in the form of user:password
repository:
description: Repository name with owner. For example, actions/checkout
default: ${{ github.repository }}
change:
description: Change in the form of 123456
ref:
description: Change revision SHA
default: ${{ github.sha }}
required: false
verified:
description: Verified in form of [-1, 0, +1]
default: ${{ job.status == 'success' && +1 || -1 }}
required: false
message:
description: Review message
default: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
required: false
runs:
using: composite
steps:
- id: gerrit-review
shell: bash
run: |
curl \
-H 'Content-Type: application/json; charset=UTF-8' \
-u '${{ inputs.auth }}' \
-d '{"message": "${{ inputs.message }}", "labels":{"Verified": ${{ inputs.verified }}}}' \
https://review.lineageos.org/a/changes/${{ inputs.change }}/revisions/${{ inputs.ref }}/review