From cded844c358697413f183852cb9337cbf74dc1fa Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Mon, 28 Oct 2024 19:08:14 +0100 Subject: [PATCH] setup(ci): setup PR name validation --- .github/workflows/validate_pr_name.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/validate_pr_name.yml diff --git a/.github/workflows/validate_pr_name.yml b/.github/workflows/validate_pr_name.yml new file mode 100644 index 0000000..c68763f --- /dev/null +++ b/.github/workflows/validate_pr_name.yml @@ -0,0 +1,23 @@ +name: "PR name validation" + +on: + pull_request: + types: ["opened", "edited", "reopened", "ready_for_review"] + +env: + REGISTRY: "ghcr.io" + +jobs: + validate-pr-name: + runs-on: "ubuntu-latest" + steps: + - name: "Login to Docker registry" + uses: "docker/login-action@v3" + with: + registry: "${{ env.REGISTRY }}" + username: "${{ github.actor }}" + password: "${{ secrets.GITHUB_TOKEN }}" + + - name: "Validate PR name" + run: "docker run --rm ${{ env.REGISTRY }}/articola-tools/pr-name-validator:latest + '${{ github.event.pull_request.title }}'" \ No newline at end of file