Cancel pkgcheck and pr-rules runs of a pull request that a newer push supersedes, and skip the report upload on cancellation so a half-finished scan is never posted. Name the two target-selection jobs after their workflow, since both showed up as "scan changed ebuilds". Give the tatt job a static name, because a skipped job never expands its matrix and showed the raw expression. Signed-off-by: Zakk <zakk@gentoozh.org>
64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
name: pkgcheck
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
scan:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v7
|
|
|
|
- name: run pkgcheck
|
|
uses: pkgcore/pkgcheck-action@v1
|
|
with:
|
|
args: --checks=-RedundantVersionCheck --keywords=-NonsolvableDepsInDev --exit=NonexistentDeps
|
|
|
|
# Ebuilds execute PR code; the write token belongs to pkgcheck-comment.
|
|
report:
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/pkgcore/pkgcheck:latest
|
|
defaults:
|
|
run:
|
|
# The image has no /bin/bash symlink.
|
|
shell: bash
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: collect the packages this PR touches
|
|
id: pkgs
|
|
run: scripts/pkgcheck-report.sh packages
|
|
|
|
- name: scan
|
|
if: steps.pkgs.outputs.count != '0'
|
|
run: scripts/pkgcheck-report.sh scan
|
|
|
|
- name: stage the report
|
|
if: ${{ !cancelled() }}
|
|
run: scripts/pkgcheck-report.sh stage
|
|
|
|
- name: upload the report
|
|
if: ${{ !cancelled() }}
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: pkgcheck-report
|
|
path: pkgcheck-report/
|