Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jebinjeb committed Aug 13, 2023
1 parent 2f104db commit ad663ea
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/agent-docker-cosign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches:
- 'main'
tags:
- 'v*..'
- 'v*.*.*'
pull_request:
branches:
- 'main'
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
id: metadata
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
images: ${{ env.REGISTRY }}/${{ github.repository }}/kubviz-agent
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand All @@ -59,7 +59,7 @@ jobs:
with:
context: .
file: ./dockerfiles/agent/kubviz/Dockerfile
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.run_id }}
tags: ${{ env.REGISTRY }}/${{ github.repository }}/kubviz-agent:${{ github.run_id }}
labels: ${{ steps.metadata.outputs.labels }}

push: true
Expand All @@ -69,12 +69,12 @@ jobs:

- name: Sign the images
run: |
cosign sign -y ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.run_id }}
cosign sign -y ${{ env.REGISTRY }}/${{ github.repository }}/kubviz-agent:${{ github.run_id }}
env:
COSIGN_EXPERIMENTAL: 1

- name: Verify the pushed tags
run: cosign verify ${{ env.REGISTRY }}/${{ github.repository }}:${{ github.run_id }} --certificate-identity ${{ env.GH_URL }}/${{ github.repository }}/.github/workflows/agent-docker-cosign.yml@refs/heads/main --certificate-oidc-issuer https://token.actions.githubusercontent.com
run: cosign verify ${{ env.REGISTRY }}/${{ github.repository }}/kubviz-agent:${{ github.run_id }} --certificate-identity ${{ env.GH_URL }}/${{ github.repository }}/.github/workflows/agent-docker-cosign.yml@refs/heads/main --certificate-oidc-issuer https://token.actions.githubusercontent.com
env:
COSIGN_EXPERIMENTAL: 1

Expand All @@ -85,4 +85,4 @@ jobs:
format: 'github'
output: 'dependency-results.sbom.json'
image-ref: '.'
github-pat: ${{ secrets.TOKEN }}
github-pat: ${{ secrets.TOKEN }}

0 comments on commit ad663ea

Please sign in to comment.