From dbfd92861937a5b756b57385bbfd93521bf22d9b Mon Sep 17 00:00:00 2001 From: Philipp Trulson Date: Sat, 20 Jan 2024 00:41:03 +0100 Subject: [PATCH] Add workflow to detect conflicts --- .github/workflows/conflicts.yaml | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/conflicts.yaml diff --git a/.github/workflows/conflicts.yaml b/.github/workflows/conflicts.yaml new file mode 100644 index 000000000..dacdabfb5 --- /dev/null +++ b/.github/workflows/conflicts.yaml @@ -0,0 +1,33 @@ +name: Check packages for file conflicts + +on: + push: + branches: + - main + pull_request: + +jobs: + detect_conflicts: + runs-on: ubuntu-latest + permissions: + pull-requests: write + name: Detect file conflicts in packages + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Run detection script + uses: serpent-os/check-for-file-conflicts@main + id: conflicts + - uses: mshick/add-pr-comment@v2 + if: failure() && github.event_name == 'pull_request' + with: + message: | + ``` + ${{ steps.conflicts.outputs.packages }} + ``` + - uses: mshick/add-pr-comment@v2 + if: success() && github.event_name == 'pull_request' + with: + update-only: true + message: | + No duplicate files detected anymore!