gitops commit koodi commit tekijän nimiin
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 17s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m26s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 2m16s
CI Feature / Report Summary (push) Successful in 5s
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 17s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m26s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 2m16s
CI Feature / Report Summary (push) Successful in 5s
This commit is contained in:
@@ -53,12 +53,20 @@ jobs:
|
||||
ID=$(date +%s | md5sum | head -c 8)
|
||||
echo "dispatch_id=$ID" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Resolve commit author
|
||||
id: author
|
||||
run: |
|
||||
echo "name=$(git log -1 --format='%an')" >> "$GITHUB_OUTPUT"
|
||||
echo "email=$(git log -1 --format='%ae')" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Dispatch to GitOps repo
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITOPS_DISPATCH_TOKEN }}
|
||||
run: |
|
||||
INPUTS=$(jq -nc \
|
||||
--arg dispatch_id "${{ steps.gen.outputs.dispatch_id }}" \
|
||||
--arg author_name "${{ steps.author.outputs.name }}" \
|
||||
--arg author_email "${{ steps.author.outputs.email }}" \
|
||||
--arg file "$GITOPS_FILE" \
|
||||
--arg yq_tpl "$GITOPS_YQ_TPL" \
|
||||
--arg version "$GITOPS_VERSION" \
|
||||
@@ -66,7 +74,7 @@ jobs:
|
||||
--arg source_commit "$GITOPS_SOURCE_COMMIT" \
|
||||
--arg git_tag_prefix "${GITOPS_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}')
|
||||
'{dispatch_id: $dispatch_id, author_name: $author_name, author_email: $author_email, 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" \
|
||||
|
||||
Reference in New Issue
Block a user