4 # yamllint disable-line rule:truthy
9 description: "Branch that change is against"
13 description: "The ID for the change"
17 description: "The Gerrit number"
21 description: "URL to the change"
25 description: "Type of Gerrit event"
28 GERRIT_PATCHSET_NUMBER:
29 description: "The patch number for the change"
32 GERRIT_PATCHSET_REVISION:
33 description: "The revision sha"
37 description: "Project in Gerrit"
41 description: "Gerrit refspec of change"
46 group: ${{ github.event.inputs.GERRIT_CHANGE_ID || github.run_id }}
47 cancel-in-progress: true
51 runs-on: ubuntu-latest
54 uses: lfit/gerrit-review-action@v0.3
56 host: ${{ vars.GERRIT_SERVER }}
57 username: ${{ vars.GERRIT_SSH_USER }}
58 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
59 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
60 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
61 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
63 - name: Allow replication
68 runs-on: ubuntu-latest
70 - uses: lfit/checkout-gerrit-change-action@v0.3
72 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
74 - name: Download actionlint
76 run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
78 - name: Check workflow files
79 run: ${{ steps.get_actionlint.outputs.executable }} -color
82 # run pre-commit tox env separately to get use of more parallel processing
85 runs-on: ubuntu-latest
87 - uses: lfit/checkout-gerrit-change-action@v0.3
89 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
91 - uses: actions/setup-python@v4
93 python-version: "3.11"
94 - name: Run static analysis and format checkers
95 run: pipx run pre-commit run --all-files --show-diff-on-failure
99 runs-on: ubuntu-latest
101 - uses: lfit/checkout-gerrit-change-action@v0.3
103 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
105 - uses: actions/setup-python@v4
108 python-version: "3.11"
109 - name: Clone git submodules
110 run: git submodule update --init
111 - name: Run JJB Verify
113 python -m pip install --upgrade pip
114 pip install jenkins-job-builder
115 mkdir -p "${HOME}/.config/jenkins_jobs"
116 cat << EOF > "${HOME}/.config/jenkins_jobs/jenkins_jobs.ini"
119 keep_descriptions=False
122 query_plugins_info=False
125 jenkins-jobs test -o archives/job-configs jjb/
129 needs: [prepare, actionlint, pre-commit, jjb-validation]
130 runs-on: ubuntu-latest
132 - uses: technote-space/workflow-conclusion-action@v3
134 uses: lfit/gerrit-review-action@v0.3
136 host: ${{ vars.GERRIT_SERVER }}
137 username: ${{ vars.GERRIT_SSH_USER }}
138 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
139 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
140 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
141 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
142 vote-type: ${{ env.WORKFLOW_CONCLUSION }}