From ca59b7f6e70ad064554fd486eaf581466fa91c90 Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Jun 2025 23:12:31 +0930 Subject: [PATCH] ci: Add PR, CI and bump jobs ref: #1 nofusscomputing/kubernetes#2 --- .cz.yaml | 21 +++++++++++++++++++ .github/workflows/bump.yaml | 31 ++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 28 +++++++++++++++++++++++++ .github/workflows/pull-requests.yaml | 14 +++++++++++++ action.yml | 2 +- 5 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .cz.yaml create mode 100644 .github/workflows/bump.yaml create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/pull-requests.yaml diff --git a/.cz.yaml b/.cz.yaml new file mode 100644 index 0000000..e88f05c --- /dev/null +++ b/.cz.yaml @@ -0,0 +1,21 @@ +--- +commitizen: + customize: + change_type_map: + feature: Features + fix: Fixes + refactor: Refactoring + test: Tests + change_type_order: + - BREAKING CHANGE + - feat + - fix + - test + - refactor + commit_parser: ^(?Pfeat|fix|test|refactor|perf|BREAKING CHANGE)(?:\((?P[^()\r\n]*)\)|\()?(?P!)?:\s(?P.*)? + name: cz_customize + prerelease_offset: 1 + tag_format: v$version + update_changelog_on_bump: false + version: v0.0.1 + version_scheme: semver diff --git a/.github/workflows/bump.yaml b/.github/workflows/bump.yaml new file mode 100644 index 0000000..266fa04 --- /dev/null +++ b/.github/workflows/bump.yaml @@ -0,0 +1,31 @@ +--- + +name: 'Bump' + + +on: + workflow_dispatch: + inputs: + CZ_PRE_RELEASE: + default: none + required: false + description: Create Pre-Release {alpha,beta,rc,none} + CZ_INCREMENT: + default: none + required: false + description: Type of bump to conduct {MAJOR,MINOR,PATCH,none} + push: + branches: + - 'master' + + +jobs: + + bump: + name: 'Bump' + uses: nofusscomputing/action_bump/.github/workflows/bump.yaml@development + with: + CZ_PRE_RELEASE: ${{ inputs.CZ_PRE_RELEASE }} + CZ_INCREMENT: ${{ inputs.CZ_INCREMENT }} + secrets: + WORKFLOW_TOKEN: ${{ secrets.WORKFLOW_TOKEN }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..bd1418d --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,28 @@ +--- + +name: 'CI' + + +on: + push: + branches: + - '**' + tags: + - '*' + +env: + GIT_SYNC_URL: "https://${{ secrets.GITLAB_USERNAME_ROBOT }}:${{ secrets.GITLAB_TOKEN_ROBOT }}@gitlab.com/nofusscomputing/projects/centurion_erp.git" + +jobs: + + + docker: + name: 'Docker' + uses: nofusscomputing/action_docker/.github/workflows/docker.yaml@development + with: + DOCKER_BUILD_IMAGE_NAME: "nofusscomputing/kubernetes-manifest-tools" + DOCKER_PUBLISH_REGISTRY: "docker.io" + DOCKER_PUBLISH_IMAGE_NAME: "nofusscomputing/kubernetes-manifest-tools" + secrets: + DOCKER_PUBLISH_USERNAME: ${{ secrets.NFC_DOCKERHUB_USERNAME }} + DOCKER_PUBLISH_PASSWORD: ${{ secrets.NFC_DOCKERHUB_TOKEN }} diff --git a/.github/workflows/pull-requests.yaml b/.github/workflows/pull-requests.yaml new file mode 100644 index 0000000..c7d0922 --- /dev/null +++ b/.github/workflows/pull-requests.yaml @@ -0,0 +1,14 @@ +--- + +name: Pull Requests + + +on: + pull_request: {} + + +jobs: + + pull-request: + name: pull-request + uses: nofusscomputing/action_pull_requests/.github/workflows/pull-requests.yaml@development diff --git a/action.yml b/action.yml index ec6eb42..c17cd68 100644 --- a/action.yml +++ b/action.yml @@ -31,7 +31,7 @@ inputs: runs: using: 'docker' - image: 'python:3.11-slim' + image: 'ghcr.io/nofusscomputing/kubernetes-manifest-tools' env: KUBECTL_SLICE_INPUT_FILE: ${{ inputs.input-file }} KUBECTL_SLICE_OUTPUT_DIR: ${{ inputs.output-dir }}