github: Add CI for verifying sensitive_pn.xml

Change-Id: I701b579896f8021b6cdfbe6ad89d60710d2d9591
This commit is contained in:
LuK1337
2024-07-22 14:26:30 +02:00
parent b2d9167c55
commit cb619b5b04
2 changed files with 51 additions and 0 deletions

13
.github/workflows/build/action.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: build
runs:
using: composite
steps:
- name: Install dependencies
shell: bash
run: sudo apt -y install libxml2-utils
- name: Validate sensitive_pn.xml
shell: bash
run: xmllint --noout --schema ./spn/SpnInfo.xsd ./prebuilt/common/etc/sensitive_pn.xml

38
.github/workflows/gerrit.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: gerrit checks
on:
workflow_dispatch:
inputs:
ref:
type: string
gerrit-ref:
type: string
change:
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: lineageos-infra/fetch-gerrit-change@main
with:
gerrit-ref: ${{ inputs.gerrit-ref }}
ref: ${{ inputs.ref }}
- name: Check if build/action.yml exists
id: check
run: |
if [ -f ./.github/workflows/build/action.yml ]; then
echo "run=1" >> "$GITHUB_OUTPUT"
fi
- name: Build
if: ${{ steps.check.outputs.run }}
uses: ./.github/workflows/build
- uses: lineageos-infra/gerrit-vote@main
if: ${{ steps.check.outputs.run && always() }}
with:
auth: ${{ secrets.GERRIT_VOTE_CREDS }}
change: ${{ inputs.change }}
ref: ${{ inputs.ref }}