blob: e0a2ecf606d9cb107f5510de53af092eab040af2 [file] [log] [blame]
Eric Ballfc501e72026-05-29 14:00:03 -07001---
2# SPDX-License-Identifier: Apache-2.0
3# SPDX-FileCopyrightText: 2026 The Linux Foundation
4name: Call Verify Workflow(s)
5
6# yamllint disable-line rule:truthy
7on:
Eric Ball6437f482026-07-13 12:35:57 -07008 workflow_dispatch:
Eric Ballfc501e72026-05-29 14:00:03 -07009 inputs:
10 # Gerrit-to-Github defaults
11 GERRIT_BRANCH:
12 description: "Branch that change is against"
13 required: true
14 type: string
15 GERRIT_CHANGE_ID:
16 description: "The ID for the change"
17 required: true
18 type: string
19 GERRIT_CHANGE_NUMBER:
20 description: "The Gerrit number"
21 required: true
22 type: string
23 GERRIT_CHANGE_URL:
24 description: "URL to the change"
25 required: true
26 type: string
27 GERRIT_EVENT_TYPE:
28 description: "Type of Gerrit event"
29 required: true
30 type: string
31 GERRIT_PATCHSET_NUMBER:
32 description: "The patch number for the change"
33 required: true
34 type: string
35 GERRIT_PATCHSET_REVISION:
36 description: "The revision sha"
37 required: true
38 type: string
39 GERRIT_PROJECT:
40 description: "Project in Gerrit"
41 required: true
42 type: string
43 GERRIT_REFSPEC:
44 description: "Gerrit refspec of change"
45 required: true
46 type: string
47 comment-only:
48 description: "Make this workflow advisory only, default false"
49 required: false
50 type: string
51 default: "false"
52
53concurrency:
54 # yamllint disable-line rule:line-length
55 group: ${{ github.repository }}-${{ github.workflow }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
56 cancel-in-progress: true
57
58permissions: read-all
59
60jobs:
61 prepare:
62 runs-on: ubuntu-latest
63 steps:
64 - name: Clear votes
65 # yamllint disable-line rule:line-length
66 uses: lfreleng-actions/gerrit-review-action@537251ec667665b386f70b330b05446e3fc29087 # v0.9
67 with:
68 host: ${{ vars.GERRIT_SERVER }}
69 username: ${{ vars.GERRIT_SSH_USER }}
70 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
71 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
72 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
73 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
74 vote-type: clear
75 comment-only: ${{ inputs.comment-only }}
76 - name: Allow replication
77 run: sleep 10s
78
79 lint-and-verify-tag:
80 needs: prepare
81 runs-on: ubuntu-latest
82 steps:
83 - name: Gerrit Checkout
84 # yamllint disable-line rule:line-length
85 uses: lfreleng-actions/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63 # v0.9
86 with:
87 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
88 gerrit-project: ${{ inputs.GERRIT_PROJECT }}
89 gerrit-url: ${{ vars.GERRIT_URL }}
90 delay: "0s"
Eric Ball51a56b82026-07-13 19:56:52 -070091 fetch-depth: 0
Eric Ballfc501e72026-05-29 14:00:03 -070092 - name: Check Tags
93 uses: opencord/shared-workflows/.github/actions/tag-check-action@main
94 - name: Lint Helm Charts
95 uses: opencord/shared-workflows/.github/actions/helm-lint-action@main
96 with:
97 target-branch: ${{ inputs.GERRIT_BRANCH }}
98
99 vote:
100 if: ${{ always() }}
101 # yamllint enable rule:line-length
102 needs: [prepare, lint-and-verify-tag]
103 runs-on: ubuntu-latest
104 steps:
105 - name: Get conclusion
106 # yamllint disable-line rule:line-length
107 uses: im-open/workflow-conclusion@e4f7c4980600fbe0818173e30931d3550801b992 # v2.2.3
108 - name: Set vote
109 # yamllint disable-line rule:line-length
110 uses: lfreleng-actions/gerrit-review-action@537251ec667665b386f70b330b05446e3fc29087 # v0.9
111 with:
112 host: ${{ vars.GERRIT_SERVER }}
113 username: ${{ vars.GERRIT_SSH_USER }}
114 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
115 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
116 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
117 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
118 vote-type: ${{ env.WORKFLOW_CONCLUSION }}
119 comment-only: ${{ inputs.comment-only }}