Skip to content

Commit

Permalink
Emit image build event for upwind
Browse files Browse the repository at this point in the history
  • Loading branch information
timdittler committed Oct 17, 2024
1 parent d2799af commit eb36877
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/template_gitops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

0 comments on commit eb36877

Please sign in to comment.