Skip to content

Commit

Permalink
github: Add CI for verifying sensitive_pn.xml
Browse files Browse the repository at this point in the history
Change-Id: I701b579896f8021b6cdfbe6ad89d60710d2d9591
  • Loading branch information
luk1337 committed Jul 22, 2024
1 parent b2d9167 commit cb619b5
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build/action.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 38 additions & 0 deletions .github/workflows/gerrit.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit cb619b5

Please sign in to comment.