Skip to content

Commit 0be1f3b

Browse files
author
Jon Lockwood
committed
Merge pull request 'feat: updates and rejig' (#33) from feat-updates-and-rejig into development
Reviewed-on: https://nofusscomputing.com/git/docker/bind/pulls/33
2 parents 9a9758f + 67d50e7 commit 0be1f3b

38 files changed

Lines changed: 899 additions & 73 deletions

.centurion/project_status.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"schemaVersion": 1,
3+
"label": "Project Status",
4+
"message": "Active",
5+
"namedLogo": "gitea",
6+
"color": "green",
7+
"style": "plastic"
8+
}

.cz.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.gitea/.gitkeep

Whitespace-only changes.

.gitea/workflows/bump.yaml

Lines changed: 243 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
1+
---
2+
3+
name: 'Bump'
4+
5+
6+
on:
7+
workflow_dispatch:
8+
inputs:
9+
CZ_PRE_RELEASE:
10+
default: none
11+
required: false
12+
description: Create Pre-Release {alpha,beta,rc,none}
13+
CZ_INCREMENT:
14+
default: none
15+
required: false
16+
description: Type of bump to conduct {MAJOR,MINOR,PATCH,none}
17+
push:
18+
branches:
19+
- 'master'
20+
21+
env:
22+
# ACTIONS_RUNNER_DEBUG: "true"
23+
# ACTIONS_STEP_DEBUG: "true"
24+
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
25+
26+
27+
jobs:
28+
29+
bump:
30+
name: 'Bump Version'
31+
if: github.event.commits[0].author.name != 'nfc-bot'
32+
runs-on: ubuntu-latest
33+
outputs:
34+
version-current: ${{ steps.version-current.outputs.value-out }}
35+
version-new: ${{ steps.version-new.outputs.value-out }}
36+
steps:
37+
38+
39+
- name: Checkout Code - ${{ github.ref_name }} Branch
40+
if: ${{ github.ref_name == 'master' }}
41+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
fetch-tags: true
45+
token: ${{ secrets.WORKFLOW_TOKEN }}
46+
ref: development
47+
48+
49+
- name: Checkout Code - ${{ github.ref_name }} Branch
50+
if: ${{ github.ref_name != 'master' }}
51+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/checkout@v4
52+
with:
53+
fetch-depth: 0
54+
fetch-tags: true
55+
token: ${{ secrets.WORKFLOW_TOKEN }}
56+
ref: ${{ github.ref_name }}
57+
58+
59+
- name: Install Commitizen
60+
shell: bash
61+
run: |
62+
pip install \
63+
commitizen==3.28.0
64+
65+
66+
- name: Fetch Current Version
67+
id: version-current
68+
run: |
69+
echo "value-out=$(cz version --project)" >> $GITHUB_OUTPUT
70+
71+
72+
- name: Increment version with .cz.yaml
73+
shell: bash
74+
run: |
75+
if [ "${{ inputs.CZ_PRE_RELEASE }}" != 'none' ]; then
76+
77+
if [ "0${{ inputs.CZ_PRE_RELEASE }}" != '0' ]; then
78+
79+
echo "[debug] Pre-Release detected: ${{ inputs.CZ_PRE_RELEASE }}";
80+
81+
export pre_release="--prerelease ${{ inputs.CZ_PRE_RELEASE }}";
82+
83+
fi;
84+
85+
fi;
86+
87+
if [ "${{ inputs.CZ_INCREMENT }}" != 'none' ]; then
88+
89+
if [ "0${{ inputs.CZ_PRE_RELEASE }}" != '0' ]; then
90+
91+
echo "[debug] Pre-Release detected: ${{ inputs.CZ_INCREMENT }}";
92+
93+
export increment="--increment ${{ inputs.CZ_INCREMENT }}";
94+
95+
fi;
96+
97+
fi;
98+
99+
cz bump \
100+
--files-only \
101+
${pre_release} \
102+
${increment} \
103+
--yes;
104+
105+
106+
- name: Fetch Current Version
107+
id: version-new
108+
run: |
109+
echo "value-out=$(cz version --project)" >> $GITHUB_OUTPUT
110+
111+
112+
- name: ls
113+
if: ${{ github.ref_name != 'master' }}
114+
shell: bash
115+
run: |
116+
ls -la
117+
118+
119+
- name: Create Incremental Changelog
120+
shell: bash
121+
run: |
122+
cz changelog --dry-run --merge-prerelease --incremental --unreleased-version "${{ steps.version-new.outputs.value-out }}" > changelog-release.md
123+
124+
125+
- name: Update Changelog
126+
shell: bash
127+
run: |
128+
cz changelog --unreleased-version "${{ steps.version-new.outputs.value-out }}"
129+
130+
131+
- name: Upload Release Changelog
132+
if: ${{ steps.version-new.outputs.value-out }}
133+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/upload-artifact@v3
134+
with:
135+
name: changelog-release
136+
path: changelog-release.md
137+
138+
139+
- name: Create Release Changelog
140+
if: ${{ steps.version-new.outputs.value-out }}
141+
shell: bash
142+
run: |
143+
rm changelog-release.md;
144+
git status;
145+
146+
147+
- name: Run Additional Actions
148+
if: ${{ steps.version-current.outputs.value-out != steps.version-new.outputs.value-out }}
149+
shell: bash
150+
run: |
151+
echo 'run script';
152+
if [ -f .github/additional_actions_bump.sh ]; then
153+
154+
echo "[Info] Set ENV vars for script's usage";
155+
156+
export CURRENT_VERSION=${{ steps.version-current.outputs.value-out }}
157+
158+
export NEW_VERSION=${{ steps.version-new.outputs.value-out }}
159+
160+
echo "[Info] ***************************************";
161+
162+
echo "[Debug]CURRENT_VERSION=${CURRENT_VERSION}";
163+
164+
echo "[Debug]NEW_VERSION=${NEW_VERSION}";
165+
166+
echo "[Info] ***************************************";
167+
168+
chmod +x .github/additional_actions_bump.sh
169+
170+
echo "[Debug] found additional action script .github/additional_actions_bump.sh";
171+
172+
echo "[Info] ***************************************";
173+
echo "[Debug] cat .github/additional_actions_bump.sh";
174+
echo "[Info] *************";
175+
176+
echo "[Debug] $(cat .github/additional_actions_bump.sh)";
177+
178+
echo "[Info] *************";
179+
echo "[Info] ***************************************";
180+
181+
.github/additional_actions_bump.sh
182+
183+
fi
184+
185+
186+
- name: Commit the changelog
187+
if: ${{ steps.version-new.outputs.value-out && github.ref_name == 'master' }}
188+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/git-auto-commit-action@v5
189+
with:
190+
commit_message: 'build: bump version ${{ steps.version-current.outputs.value-out }} -> ${{ steps.version-new.outputs.value-out }}'
191+
branch: development
192+
commit_user_name: nfc-bot
193+
commit_user_email: helpdesk@nofusscomputing.com
194+
commit_author: nfc-bot <helpdesk@nofusscomputing.com>
195+
tagging_message: ${{ steps.version-new.outputs.value-out }}
196+
skip_dirty_check: true
197+
skip_fetch: true
198+
skip_checkout: true
199+
disable_globbing: true
200+
201+
202+
- name: Commit the changelog
203+
if: ${{ steps.version-new.outputs.value-out && github.ref_name != 'master'}}
204+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/git-auto-commit-action@v5
205+
with:
206+
commit_message: 'build: bump version ${{ steps.version-current.outputs.value-out }} -> ${{ steps.version-new.outputs.value-out }}'
207+
branch: ${{ github.ref_name }}
208+
commit_user_name: nfc-bot
209+
commit_user_email: helpdesk@nofusscomputing.com
210+
commit_author: nfc-bot <helpdesk@nofusscomputing.com>
211+
tagging_message: ${{ steps.version-new.outputs.value-out }}
212+
skip_dirty_check: true
213+
skip_fetch: true
214+
skip_checkout: true
215+
disable_globbing: true
216+
217+
218+
- name: Configure git
219+
shell: bash
220+
run: |
221+
git config --global user.email "helpdesk@nofusscomputing.com";
222+
git config --global user.name "nfc-bot";
223+
224+
225+
- name: Checkout master
226+
if: ${{ github.ref_name == 'master' }}
227+
shell: bash
228+
run: |
229+
git checkout master;
230+
231+
232+
- name: Merge changes to master
233+
if: ${{ github.ref_name == 'master' }}
234+
shell: bash
235+
run: |
236+
git merge --no-ff development;
237+
238+
239+
- name: Push changes
240+
if: ${{ github.ref_name == 'master' }}
241+
shell: bash
242+
run: |
243+
git push origin master;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
3+
name: Mirror
4+
5+
6+
on:
7+
push:
8+
branches:
9+
- '*'
10+
11+
12+
env:
13+
token: ${{ secrets.ACTIONS_TOKEN_RO }}
14+
15+
16+
jobs:
17+
18+
19+
mirror-github:
20+
name: Github
21+
runs-on: ubuntu-latest
22+
steps:
23+
24+
- name: Checkout Code
25+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
fetch-tags: true
29+
30+
- name: Mirror
31+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/repository-mirroring-action@v1
32+
with:
33+
target_repo_url: ssh://github.com/nofusscomputing/docker-bind
34+
ssh_private_key: ${{ secrets.SSH_DEPLOY_KEY_GITHUB }}
35+
ssh_username: git
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
3+
name: Pull Requests
4+
5+
6+
on:
7+
pull_request: {}
8+
9+
10+
jobs:
11+
12+
13+
conventional-pr-title:
14+
name: Conventional PR Title
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
steps:
19+
20+
21+
- name: Conventional Commit PR Title
22+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/conventional-commit-checker-action@v1.0.0
23+
with:
24+
pr-title-regex: "^(.+)(?:(([^)s]+)))?: (.+)"
25+
pr-body-regex: "(.*)"
26+
GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
27+
token: ${{ secrets.WORKFLOW_TOKEN }}

.gitea/workflows/push.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
3+
name: Push
4+
5+
6+
on:
7+
push:
8+
branches:
9+
- '*'
10+
11+
12+
env:
13+
ACTIONS_RUNNER_DEBUG: "true"
14+
ACTIONS_STEP_DEBUG: "true"
15+
16+
17+
jobs:
18+
19+
20+
conventional-commits:
21+
name: Conventional Commits
22+
if: ${{ github.ref_name != 'master' && github.event_name == 'push' }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
26+
- name: Trace
27+
shell: bash
28+
run: |
29+
export
30+
31+
- name: Check Commits
32+
uses: http://${{ secrets.ACTIONS_TOKEN_RO }}@gitea-http.git.svc:3000/actions/action-conventional-commits@v1.1.17
33+
with:
34+
token: ${{ secrets.ACTIONS_TOKEN_RO }}
35+
skip_merge: true
36+
skip_revert: true
37+
types: "build|bump|chore|ci|docs|feat|fix|perf|refactor|revert|style|test"

0 commit comments

Comments
 (0)