From 73fd953c35940b4400a1da2e4d2d1947aeadd5ca Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Tue, 19 Dec 2023 20:53:29 -0700 Subject: [PATCH] feat(ci): Add rpmlint action to lint spec files (#6) Performs rpmlint on all spec files in the repository --- .github/workflows/rpmlint.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/rpmlint.yml diff --git a/.github/workflows/rpmlint.yml b/.github/workflows/rpmlint.yml new file mode 100644 index 0000000..596b276 --- /dev/null +++ b/.github/workflows/rpmlint.yml @@ -0,0 +1,40 @@ +name: Lint packages +on: + pull_request: + branches: + - main + paths-ignore: + - '**.md' + - '**.txt' + push: + branches: + - main + paths-ignore: + - '**.md' + - '**.txt' + merge_group: + workflow_dispatch: + +jobs: + push-ghcr: + name: rpmlint + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + id-token: write + strategy: + fail-fast: false + steps: + - name: Perform checkout + uses: actions/checkout@v4 + + - name: Find spec files + run: | + SPECS=$(find ./ -type 'f' | grep ".spec") + echo "SPECS=$SPECS" >> $GITHUB_ENV + + - name: Run rpmlint + uses: EyeCantCU/rpmlint-action@v0.1.0 + with: + rpmfiles: ${{ env.SPECS }}