From 71dce66ef357d1c46aceb569b18cbc42db8d773f Mon Sep 17 00:00:00 2001 From: "Alexander V. Wolf" Date: Wed, 25 Dec 2024 21:56:12 +0700 Subject: [PATCH] [GHA] Refactoring config for GHA --- .github/workflows/check-line-endings.yml | 21 ---------------- .../{merge-conflict.yml => maintenance.yml} | 24 +++++++++++++++++-- 2 files changed, 22 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/check-line-endings.yml rename .github/workflows/{merge-conflict.yml => maintenance.yml} (61%) diff --git a/.github/workflows/check-line-endings.yml b/.github/workflows/check-line-endings.yml deleted file mode 100644 index a560ee1212d1f..0000000000000 --- a/.github/workflows/check-line-endings.yml +++ /dev/null @@ -1,21 +0,0 @@ -# -# See https://github.com/marketplace/actions/check-crlf -# -name: "Maintenance" -on: - push: - pull_request_target: - types: [synchronize] - -jobs: - main: - name: "Check CRLF line endings" - runs-on: ubuntu-latest - if: "!contains(github.actor, 'transifex')" - steps: - - name: Checkout repository contents - uses: actions/checkout@v4 - - - name: Check CRLF line endings - uses: erclu/check-crlf@v1 - \ No newline at end of file diff --git a/.github/workflows/merge-conflict.yml b/.github/workflows/maintenance.yml similarity index 61% rename from .github/workflows/merge-conflict.yml rename to .github/workflows/maintenance.yml index 0c0c2e40560be..4b1ef6bae5af0 100644 --- a/.github/workflows/merge-conflict.yml +++ b/.github/workflows/maintenance.yml @@ -1,5 +1,5 @@ # -# See https://github.com/marketplace/actions/label-conflicting-pull-requests +# Various maintenance operations # name: "Maintenance" on: @@ -10,9 +10,14 @@ on: # In `pull_request` we wouldn't be able to change labels of fork PRs pull_request_target: types: [synchronize] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: - main: + # + # See https://github.com/marketplace/actions/label-conflicting-pull-requests + # + check-conflicts: name: "Check conflicts" runs-on: ubuntu-latest if: "!contains(github.actor, 'transifex')" @@ -24,3 +29,18 @@ jobs: repoToken: "${{ secrets.GITHUB_TOKEN }}" commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request." commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly." + + # + # See https://github.com/marketplace/actions/check-crlf + # + check-crlf: + name: "Check CRLF line endings" + runs-on: ubuntu-latest + if: "!contains(github.actor, 'transifex')" + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Check CRLF line endings + uses: erclu/check-crlf@v1 +