blob: 601cfc797752d749619b6fda36e26029b5cb2a85 [file] [log] [blame]
Eric Ball8f404442026-01-05 21:31:56 -08001---
2# SPDX-License-Identifier: Apache-2.0
3# SPDX-FileCopyrightText: 2026 The Linux Foundation
4
5name: Lint GitHub Actions workflows
6
7# yamllint disable-line rule:truthy
8on:
9 workflow_dispatch:
10 inputs:
11 # Gerrit-to-Github defaults
12 GERRIT_BRANCH:
13 description: "Branch that change is against"
14 required: true
15 type: string
16 GERRIT_CHANGE_ID:
17 description: "The ID for the change"
18 required: true
19 type: string
20 GERRIT_CHANGE_NUMBER:
21 description: "The Gerrit number"
22 required: true
23 type: string
24 GERRIT_CHANGE_URL:
25 description: "URL to the change"
26 required: true
27 type: string
28 GERRIT_EVENT_TYPE:
29 description: "Type of Gerrit event"
30 required: true
31 type: string
32 GERRIT_PATCHSET_NUMBER:
33 description: "The patch number for the change"
34 required: true
35 type: string
36 GERRIT_PATCHSET_REVISION:
37 description: "The revision sha"
38 required: true
39 type: string
40 GERRIT_PROJECT:
41 description: "Project in Gerrit"
42 required: true
43 type: string
44 GERRIT_REFSPEC:
45 description: "Gerrit refspec of change"
46 required: true
47 type: string
48
49concurrency:
50 # yamllint disable-line rule:line-length
51 group: verify-workflows-${{ github.workflow }}-${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
52 cancel-in-progress: true
53
54jobs:
55 actionlint:
56 runs-on: ubuntu-latest
57 steps:
58 # yamllint disable-line rule:line-length
59 - uses: lfreleng-actions/checkout-gerrit-change-action@54d751e8bd167bc91f7d665dabe33fae87aaaa63 # v0.9
60 with:
61 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
62 gerrit-project: ${{ inputs.GERRIT_PROJECT }}
63 gerrit-url: ${{ vars.GERRIT_URL }}
64 delay: "0s"
65 - name: Download actionlint
66 id: get_actionlint
67 # yamllint disable-line rule:line-length
68 run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
69 shell: bash
70 - name: Check workflow files
71 run: ${{ steps.get_actionlint.outputs.executable }} -color
72 shell: bash