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 }}