From eb3687706c18af3ef2f956e034cc8a88b358c3b8 Mon Sep 17 00:00:00 2001 From: Tim Dittler Date: Tue, 15 Oct 2024 15:02:42 +0200 Subject: [PATCH] Emit image build event for upwind --- .github/workflows/template_gitops.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template_gitops.yml b/.github/workflows/template_gitops.yml index 8cf789d..b592f91 100644 --- a/.github/workflows/template_gitops.yml +++ b/.github/workflows/template_gitops.yml @@ -104,7 +104,8 @@ jobs: owner: ${{inputs.gitops-organization }} - name: GitOps (build, push and deploy a new Docker image) - uses: Staffbase/gitops-github-action@v6.3 + id: gitops + uses: Staffbase/gitops-github-action@v6.3.1 with: docker-registry: ${{ inputs.docker-registry }} docker-username: ${{ secrets.docker-username }} @@ -129,3 +130,17 @@ jobs: gitops-stage: ${{ inputs.gitops-stage }} gitops-prod: ${{ inputs.gitops-prod }} working-directory: ${{ inputs.working-directory }} + + - name: Emit Image Build Event to Upwind.io + env: + UPWIND_CLIENT_ID: ${{ vars.UPWIND_CLIENT_ID }} + UPWIND_CLIENT_SECRET: ${{ secrets.UPWIND_CLIENT_SECRET }} + UPWIND_ORGANIZATION_ID: ${{ vars.UPWIND_ORGANIZATION_ID }} + if: env.UPWIND_CLIENT_ID != '' && env.UPWIND_CLIENT_SECRET != '' && env.UPWIND_ORGANIZATION_ID != '' + uses: upwindsecurity/create-image-build-event-action@v2 + with: + image: "${{ inputs.docker-image }}" + image_sha: "${{ steps.gitops.outputs.docker-digest }}" + upwind_client_id: ${{ env.UPWIND_CLIENT_ID }} + upwind_client_secret: ${{ env.UPWIND_CLIENT_SECRET }} + upwind_organization_id: ${{ env.UPWIND_ORGANIZATION_ID }}