From 89c1f6438646fca2cde1d93652bb64da6ff08be7 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 2 Jan 2025 20:19:37 +0000 Subject: [PATCH 1/2] fix(ci): use the conventionalcommits preset instead of angular --- .gitea/workflows/release.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 8e0e32a..79a19fc 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -77,6 +77,8 @@ jobs: with: git-url: ${{ steps.set_srvurl.outputs.srvurl }} github-token: ${{ gitea.token }} + preset: "conventionalcommits" + # preset: "angular" # This is the default skip-commit: true release-count: 1 output-file: false @@ -157,24 +159,7 @@ jobs: annotations: ${{ steps.meta.outputs.annotations }} labels: ${{ steps.meta.outputs.labels }} tags: ${{ steps.meta.outputs.tags }} - - # - name: Build images - # run: | - # bldcmd="docker buildx build --load" - # strtags="${{ steps.meta.outputs.tags }}" - # strlabels="${{ steps.meta.outputs.labels }}" - # strannotations="${{ steps.meta.outputs.annotations }}" - # readarray -t tags <<<"$strtags" - # readarray -t labels <<<"$strlabels" - # readarray -t annotations <<<"$strannotations" - # for element in "${tags[@]}"; do bldcmd="$bldcmd --tag \"$element\""; done - # for element in "${labels[@]}"; do bldcmd="$bldcmd --label \"$element\""; done - # for element in "${annotations[@]}"; do bldcmd="$bldcmd --annotation \"$element\""; done - # bldcmd="$bldcmd ${{ gitea.workspace }}" - # echo "$bldcmd" - # echo "" - # sh -c "$bldcmd" - + - name: Push images run: | strtags="${{ steps.meta.outputs.tags }}" -- 2.45.2 From 96a836cc17fbb817308c93ca959a28afb3172e9c Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Thu, 2 Jan 2025 20:25:07 +0000 Subject: [PATCH 2/2] feat(ci): enforce conventional commit PR titles --- .gitea/workflows/pr-title-semantic.yml | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .gitea/workflows/pr-title-semantic.yml diff --git a/.gitea/workflows/pr-title-semantic.yml b/.gitea/workflows/pr-title-semantic.yml new file mode 100644 index 0000000..16fc7a3 --- /dev/null +++ b/.gitea/workflows/pr-title-semantic.yml @@ -0,0 +1,27 @@ +name: "Enforce Conventional Commit PR Title" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - reopened + - labeled + - unlabeled + +jobs: + validate: + name: Validate PR Title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITEA_TOKEN }} + with: + requireScope: true + wip: true + validateSingleCommit: true + validateSingleCommitMatchesPrTitle: true + githubBaseUrl: https://git.tainton.uk/api/v1 + ignoreLabels: ignore-semantic-pull-request -- 2.45.2