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
67 runs-on: ubuntu-latest
69 - uses: lfit/checkout-gerrit-change-action@v0.3
71 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
73 - name: Download actionlint
75 run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
77 - name: Check workflow files
78 run: ${{ steps.get_actionlint.outputs.executable }} -color
81 # run pre-commit tox env separately to get use of more parallel processing
84 runs-on: ubuntu-latest
86 - uses: lfit/checkout-gerrit-change-action@v0.3
88 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
90 - uses: actions/setup-python@v4
92 python-version: "3.11"
93 - name: Run static analysis and format checkers
94 run: pipx run tox -e pre-commit
98 runs-on: ubuntu-latest
100 - uses: lfit/checkout-gerrit-change-action@v0.3
102 gerrit-refspec: ${{ inputs.GERRIT_REFSPEC }}
104 - uses: actions/setup-python@v4
107 python-version: "3.11"
108 - name: Clone git submodules
109 run: git submodule update --init
110 - name: Run JJB Verify
112 python -m pip install --upgrade pip
113 pip install jenkins-job-builder
114 mkdir -p "${HOME}/.config/jenkins_jobs"
115 cat << EOF > "${HOME}/.config/jenkins_jobs/jenkins_jobs.ini"
118 keep_descriptions=False
121 query_plugins_info=False
124 jenkins-jobs test -o archives/job-configs jjb/
128 needs: [prepare, actionlint, pre-commit, jjb-validation]
129 runs-on: ubuntu-latest
131 - uses: technote-space/workflow-conclusion-action@v3
133 uses: lfit/gerrit-review-action@v0.3
135 host: ${{ vars.GERRIT_SERVER }}
136 username: ${{ vars.GERRIT_SSH_USER }}
137 key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
138 known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
139 gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
140 gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
141 vote-type: ${{ env.WORKFLOW_CONCLUSION }}