bc6bb78973
CI Git-Pages Main / Load git-pages.gitea-env.conf to pipeline env (push) Successful in 34s
CI Main / Check existing artifact (push) Successful in 22s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 48s
CI Main / Bats tests (push) Successful in 1m34s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 1m45s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 34s
CI Git-Pages Main / Check existing artifact (push) Successful in 21s
ci-helm-build-push Helm push 0.1.5
unit-tests Bats test report
CI Git-Pages Main / Update chart to the cluster (push) Failing after 0s
ci-docker-build-push Docker push 0.2.25
CI Git-Pages Main / Report Summary (push) Successful in 7s
CI Main / Build & Push Docker (push) Successful in 44s
CI Main / GitOps (push) Failing after 22s
CI Main / Move provider version tag (push) Has been skipped
CI Main / Report Summary (push) Successful in 6s
Co-authored-by: moilanik <niko.moilanen@tietoevry.com> Reviewed-on: #37
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: GitOps Dispatch
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
env_json:
|
|
required: true
|
|
type: string
|
|
version:
|
|
required: true
|
|
type: string
|
|
GITOPS_FILE:
|
|
required: true
|
|
type: string
|
|
GITOPS_YQ_TPL:
|
|
required: true
|
|
type: string
|
|
GITOPS_REPO:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
GITOPS_DISPATCH_TOKEN:
|
|
required: true
|
|
outputs:
|
|
summary:
|
|
description: 'Pipe-format: component|version|status|commit_sha|repo'
|
|
value: ${{ jobs.dispatch.outputs.summary }}
|
|
|
|
env:
|
|
GITOPS_VERSION: ${{ inputs.version }}
|
|
GITOPS_FILE: ${{ inputs.GITOPS_FILE }}
|
|
GITOPS_YQ_TPL: ${{ inputs.GITOPS_YQ_TPL }}
|
|
GITOPS_REPO: ${{ inputs.GITOPS_REPO }}
|
|
GITOPS_SOURCE_REPO: ${{ github.repository }}
|
|
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_WORKFLOW: gitops-service.yaml
|
|
|
|
jobs:
|
|
dispatch:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
summary: ${{ steps.run.outputs.GITOPS_SUMMARY }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: niko/gitea-ci-library
|
|
path: .ci
|
|
- name: Run gitops dispatch
|
|
id: run
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITOPS_DISPATCH_TOKEN }}
|
|
run: |
|
|
OUTPUT=$(bash .ci/scripts/gitops-dispatch.sh)
|
|
echo "$OUTPUT"
|
|
SUMMARY=$(awk -F= '/^GITOPS_SUMMARY=/ {print $2}' <<<"$OUTPUT")
|
|
echo "GITOPS_SUMMARY=$SUMMARY" >> "$GITHUB_OUTPUT"
|