chore(deps): update actions/checkout action to v5 #56
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| security-events: write | |
| jobs: | |
| build-edge: | |
| if: | | |
| github.event_name == 'push' && | |
| github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Build docker | |
| uses: meysam81/build-docker@main | |
| with: | |
| image-name: ghcr.io/meysam81/${{ github.event.repository.name }} | |
| image-extra-tags: | | |
| ghcr.io/meysam81/${{ github.event.repository.name }}:${{ github.run_id }} | |
| ghcr.io/meysam81/${{ github.event.repository.name }}:nightly | |
| ghcr.io/meysam81/${{ github.event.repository.name }}:latest | |
| kubescape: true | |
| kubescape-upload-sarif: true | |
| build-pr: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Build docker | |
| uses: meysam81/build-docker@main | |
| with: | |
| image-name: ghcr.io/meysam81/${{ github.event.repository.name }} | |
| kubescape: true | |
| scout-comment-pr: true | |
| scout-compare: true | |
| scout-cves: true | |
| semantic-release: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| ssh-key: ${{ secrets.GH_DEPLOY_KEY }} | |
| - name: Setup bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install bun deps | |
| run: bun install | |
| - name: Install syft | |
| uses: anchore/sbom-action/download-syft@v0 | |
| - name: Setup Cosign CLI | |
| uses: sigstore/cosign-installer@v3 | |
| - name: Install goreleaser | |
| run: | | |
| echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | sudo tee /etc/apt/sources.list.d/goreleaser.list | |
| sudo apt update | |
| sudo apt install -y goreleaser | |
| goreleaser --version | |
| - id: semantic-release | |
| name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: bunx semantic-release@v24 | |
| - if: steps.semantic-release.outputs.version != '' | |
| name: Extract semver major version | |
| id: semver | |
| run: | | |
| major=$(echo "${{ steps.semantic-release.outputs.version }}" | cut -d. -f1) | |
| echo "major=${major}" >> "$GITHUB_OUTPUT" | |
| - if: steps.semantic-release.outputs.version != '' | |
| name: Build docker | |
| uses: meysam81/build-docker@main | |
| with: | |
| cosign: true | |
| build-args: | | |
| VERSION=${{ steps.semantic-release.outputs.version }} | |
| image-name: ghcr.io/meysam81/${{ github.event.repository.name }} | |
| image-extra-tags: | | |
| ghcr.io/meysam81/${{ github.event.repository.name }}:${{ steps.semantic-release.outputs.version }} | |
| ghcr.io/meysam81/${{ github.event.repository.name }}:${{ steps.semver.outputs.major }} | |
| ghcr.io/meysam81/${{ github.event.repository.name }}:stable | |
| metadata-tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| ref: ${{ steps.semantic-release.outputs.version }} | |
| kubescape: true |