Skip to content

Commit

Permalink
feat(CI): add release please
Browse files Browse the repository at this point in the history
  • Loading branch information
meysam81 committed Nov 11, 2024
1 parent 48a3e9b commit 9c0d894
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,26 @@ jobs:
kubescape: true
kubescape-upload-sarif: true

release-please:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
releases_created: ${{ steps.release-please.outputs.releases_created }}
tag_name: ${{ steps.release-please.outputs.tag_name }}
steps:
- id: release-please
name: Release please
uses: googleapis/release-please-action@v4
with:
release-type: simple

build-tag:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
needs:
- release-please
if: needs.release-please.outputs.releases_created == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -63,7 +81,7 @@ jobs:
with:
image-name: ghcr.io/${{ github.repository }}
image-extra-tags: |
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:${{ needs.release-please.outputs.tag_name }}
platforms: linux/amd64,linux/arm64
kubescape: true

Expand Down

0 comments on commit 9c0d894

Please sign in to comment.