From 59f300412676e39e9b02697c26a649249182a355 Mon Sep 17 00:00:00 2001 From: Mate Vago Date: Mon, 9 Dec 2024 14:48:36 +0100 Subject: [PATCH] build: add deploy job --- .github/workflows/deploy_external.yaml | 2 +- .github/workflows/product_builder.yaml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_external.yaml b/.github/workflows/deploy_external.yaml index cd8bca666..1702f0c27 100644 --- a/.github/workflows/deploy_external.yaml +++ b/.github/workflows/deploy_external.yaml @@ -5,7 +5,7 @@ on: workflows: - 'product_builder' branches: - - 'feat/release-candidate' + - 'develop' types: - completed permissions: diff --git a/.github/workflows/product_builder.yaml b/.github/workflows/product_builder.yaml index eca19d3b6..cf41e4a94 100644 --- a/.github/workflows/product_builder.yaml +++ b/.github/workflows/product_builder.yaml @@ -765,3 +765,15 @@ jobs: cosign sign --yes --key cosign.key $(docker inspect --format='{{index .RepoDigests 0}}' ${DOCKERHUB_REGISTRY}/kratos:${{ needs.gather_changes.outputs.tag }} ) env: COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} + deploy: + runs-on: ubuntu-22.04 + needs: [go_push, crux_push, crux-ui_push, kratos_push] + environment: Workflow - Protected + steps: + - name: Execute dedicated Sunilium instance webhook + run: | + if curl -s -X POST --fail --head 'Authorization: Bearer ${{secrets.SUN_DYO_WEBHOOK_TOKEN}}' ${{secrets.SUN_DYO_WEBHOOK_API_URL}}; then + echo "Deployment successful." + else + exit 1 + fi