From 4800a3038778911b560782efa30ded7eb73bec5b Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Wed, 13 Sep 2023 20:04:29 +0200 Subject: [PATCH] docs(workflows/semantic-pull-request): enhance documentation --- .github/workflows/semantic-pull-request.md | 16 ++++++++-------- .github/workflows/semantic-pull-request.yml | 19 +++++++++++++------ Makefile | 2 +- 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/semantic-pull-request.md b/.github/workflows/semantic-pull-request.md index 924f276..9884e4e 100644 --- a/.github/workflows/semantic-pull-request.md +++ b/.github/workflows/semantic-pull-request.md @@ -5,9 +5,11 @@ -Workflow to ensure "Squash and merge" Pull Request strategy provides a valid commit message. -Check that the title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. -Mainly using [action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request#installation), with some opinionated defaults. +Workflow to ensure Pull Request provides semantic versionning assets: + +- "Squash and merge" Pull Request strategy provides a valid commit message. + Check that the title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. + Mainly using [action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request#installation), with some opinionated defaults. @@ -29,7 +31,6 @@ jobs: uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@0.7.2 secrets: # Token for the repository. - # See https://github.com/amannn/action-semantic-pull-request#installation # Default GITHUB_TOKEN github-token: "" ``` @@ -37,13 +38,12 @@ jobs: -| **Secret** | **Description** | | **Default** | **Required** | -| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------- | ------------ | -| **github-token** | Token for the repository. See [https://github.com/amannn/action-semantic-pull-request#installation](https://github.com/actions/first-interaction#usage) | | GITHUB_TOKEN | **false** | +| **Secret** | **Description** | **Required** | +| ----------------------------- | ----------------------------------------------- | ------------ | +| **github-token** | Token for the repository. Default: GITHUB_TOKEN | **false** | - diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index aa3d29f..21132fb 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -1,10 +1,11 @@ # Semantic pull request # ========================== -# Workflow to ensure "Squash and merge" Pull Request strategy provides a valid commit message. -# Check that the title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. -# Mainly using [action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request#installation), with some opinionated defaults. +# Workflow to ensure Pull Request provides semantic versionning assets: +# - "Squash and merge" Pull Request strategy provides a valid commit message. +# Check that the title follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. +# Mainly using [action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request#installation), with some opinionated defaults. -name: "Pull Request - Semantic Lint" +name: "Semantic Pull Request" on: pull_request_target: @@ -16,12 +17,18 @@ on: workflow_call: secrets: github-token: - description: 'Token for the repository. See https://github.com/amannn/action-semantic-pull-request#installation' + description: "Token for the repository. Default: GITHUB_TOKEN" + required: false + +permissions: + contents: write + pull-requests: write jobs: - main: + lint: name: Validate PR title runs-on: ubuntu-latest + steps: - uses: amannn/action-semantic-pull-request@v5 env: diff --git a/Makefile b/Makefile index ae124bc..6b504ee 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ help: ## Display help lint: ## Execute linting (https://github.com/super-linter/super-linter) DEFAULT_WORKSPACE="$(CURDIR)"; \ VOLUME="$$DEFAULT_WORKSPACE:$$DEFAULT_WORKSPACE"; \ - LINTER_IMAGE="super-linter/super-linter:slim-v4"; \ + LINTER_IMAGE="ghcr.io/super-linter/super-linter:slim-v5"; \ docker pull $$LINTER_IMAGE; \ docker run \ -e RUN_LOCAL=true -e USE_FIND_ALGORITHM=true \