chore(deps): update aquasecurity/trivy-action action to v0.34.0 (#247) #217
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: Merge to Main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - ".github/ISSUE_TEMPLATE/*" | |
| - "**.md" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| vars: | |
| name: Set Variables | |
| outputs: | |
| pr: ${{ steps.pr.outputs.pr }} | |
| semver: ${{ steps.semver.outputs.version }} | |
| tag: ${{ steps.semver.outputs.tag }} | |
| clean_changelog: ${{ steps.semver.outputs.clean_changelog }} | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 1 | |
| steps: | |
| # Get PR number for squash merges to main | |
| - name: PR Number | |
| id: pr | |
| uses: bcgov/action-get-pr@35514fa1d4765547da319e967b509363598e8b46 # v0.1.0 | |
| - name: Conventional Changelog Update | |
| uses: TriPSs/conventional-changelog-action@84dadaf2c367cb52af02737cd9c7e888807219e7 # v6.2.0 | |
| id: semver | |
| with: | |
| git-branch: refs/heads/${{ github.head_ref }} | |
| git-push: "false" | |
| skip-commit: "true" | |
| skip-on-empty: "false" | |
| skip-version-file: "true" | |
| certextractor: | |
| name: Promote certextractor | |
| needs: [vars] | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| packages: write | |
| steps: | |
| - uses: shrink/actions-docker-registry-tag@f04afd0559f66b288586792eb150f45136a927fa # v4 | |
| with: | |
| registry: ghcr.io | |
| repository: ${{ github.repository }}/certextractor | |
| target: ${{ needs.vars.outputs.semver }}.PR${{ needs.vars.outputs.pr}} | |
| tags: ${{ needs.vars.outputs.semver }} | |
| tagging: | |
| name: Tagging library | |
| needs: [vars, certextractor] | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Create Release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2 | |
| if: needs.vars.outputs.tag != '' | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| token: ${{ github.token }} | |
| tag_name: ${{ needs.vars.outputs.tag }} | |
| name: ${{ needs.vars.outputs.tag }} | |
| body: | | |
| ${{ needs.vars.outputs.clean_changelog }} | |
| The Cert Extractor image is available at: | |
| `ghcr.io/${{ github.repository }}/certextractor:${{ needs.vars.outputs.semver }}` | |
| cleanup: | |
| name: Dependency cleanup | |
| needs: [tagging] | |
| runs-on: ununtu-24.04 | |
| permissions: | |
| packages: write | |
| strategy: | |
| matrix: | |
| name: [certextract] | |
| include: | |
| - name: certextract | |
| type: "container" | |
| package: "certextractor" | |
| steps: | |
| - uses: actions/delete-package-versions@v5 | |
| with: | |
| package-name: ${{ matrix.package }} | |
| package-type: ${{ matrix.type }} | |
| min-versions-to-keep: 2 |