välitetään opt extra param, että esim. helm build onnnistuu gitops repossa
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 16s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m9s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m20s
CI Feature / Report Summary (push) Successful in 3s

This commit is contained in:
moilanik
2026-06-27 03:03:30 +03:00
parent 848ba723e4
commit a8931aeca8
4 changed files with 40 additions and 5 deletions
+6 -1
View File
@@ -17,6 +17,9 @@ on:
GITOPS_REPO:
required: true
type: string
GITOPS_EXTRA_CMD:
required: false
type: string
secrets:
GITOPS_DISPATCH_TOKEN:
required: true
@@ -34,6 +37,7 @@ env:
GITOPS_SOURCE_COMMIT: ${{ github.sha }}
GITEA_API_URL: ${{ fromJson(inputs.env_json).GITEA_API_URL }}
GITOPS_TAG_PREFIX: ${{ fromJson(inputs.env_json).GIT_TAG_PREFIX || '' }}
GITOPS_EXTRA_CMD: ${{ inputs.GITOPS_EXTRA_CMD || '' }}
GITOPS_WORKFLOW: gitops-service.yaml
GITOPS_DISPATCH_TIMEOUT: 30
@@ -61,7 +65,8 @@ jobs:
--arg source_repo "$GITOPS_SOURCE_REPO" \
--arg source_commit "$GITOPS_SOURCE_COMMIT" \
--arg git_tag_prefix "${GITOPS_TAG_PREFIX:-}" \
'{dispatch_id: $dispatch_id, file: $file, yq_tpl: $yq_tpl, version: $version, source_repo: $source_repo, source_commit: $source_commit, git_tag_prefix: $git_tag_prefix}')
--arg extra_cmd "${GITOPS_EXTRA_CMD:-}" \
'{dispatch_id: $dispatch_id, file: $file, yq_tpl: $yq_tpl, version: $version, source_repo: $source_repo, source_commit: $source_commit, git_tag_prefix: $git_tag_prefix, extra_cmd: $extra_cmd}')
curl -s -X POST \
"${GITEA_API_URL}/api/v1/repos/${GITOPS_REPO}/actions/workflows/${GITOPS_WORKFLOW}/dispatches" \
-H "Authorization: token $GITEA_TOKEN" \