chore(ci): update CI to work better with conventional commits #454
27
.gitea/workflows/pr-title-semantic.yml
Normal file
27
.gitea/workflows/pr-title-semantic.yml
Normal file
@ -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
|
@ -77,6 +77,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
git-url: ${{ steps.set_srvurl.outputs.srvurl }}
|
git-url: ${{ steps.set_srvurl.outputs.srvurl }}
|
||||||
github-token: ${{ gitea.token }}
|
github-token: ${{ gitea.token }}
|
||||||
|
preset: "conventionalcommits"
|
||||||
|
# preset: "angular" # This is the default
|
||||||
skip-commit: true
|
skip-commit: true
|
||||||
release-count: 1
|
release-count: 1
|
||||||
output-file: false
|
output-file: false
|
||||||
@ -158,23 +160,6 @@ jobs:
|
|||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
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
|
- name: Push images
|
||||||
run: |
|
run: |
|
||||||
strtags="${{ steps.meta.outputs.tags }}"
|
strtags="${{ steps.meta.outputs.tags }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user