ci: update cosign to v2.4.0 and add semantic commit validation (#69)

This commit is contained in:
Copilot
2025-10-04 15:08:41 +03:00
committed by GitHub
parent ce8958698f
commit d19c49bd48
10 changed files with 180 additions and 13 deletions

View File

@@ -34,23 +34,23 @@ jobs:
# Generate multiple formats for different actions to demonstrate new functionality
echo "Generating documentation for example-action..."
go run . gen testdata/example-action/ --output $PWD/docs/example-action.md
go run . gen testdata/example-action/ -f html --output $PWD/docs/example-action.html
go run . gen testdata/example-action/ -f json --output $PWD/docs/example-action.json
go run . gen testdata/example-action/ --output "$PWD/docs/example-action.md"
go run . gen testdata/example-action/ -f html --output "$PWD/docs/example-action.html"
go run . gen testdata/example-action/ -f json --output "$PWD/docs/example-action.json"
echo "Generating documentation for composite-action..."
go run . gen testdata/composite-action/ --output $PWD/docs/composite-action.md
go run . gen testdata/composite-action/ -f html --output $PWD/docs/composite-action.html
go run . gen testdata/composite-action/ --output "$PWD/docs/composite-action.md"
go run . gen testdata/composite-action/ -f html --output "$PWD/docs/composite-action.html"
# Test single file targeting
echo "Generating from specific action.yml files..."
go run . gen testdata/example-action/action.yml --output $PWD/docs/direct-example.md
go run . gen testdata/composite-action/action.yml --output $PWD/docs/direct-composite.md
go run . gen testdata/example-action/action.yml --output "$PWD/docs/direct-example.md"
go run . gen testdata/composite-action/action.yml --output "$PWD/docs/direct-composite.md"
# Test recursive generation with different themes
echo "Testing recursive generation with themes..."
go run . gen testdata/ --recursive --theme minimal -f html --output $PWD/docs/all-actions-minimal.html
go run . gen testdata/ --recursive --theme professional -f json --output $PWD/docs/all-actions-professional.json
go run . gen testdata/ --recursive --theme minimal -f html --output "$PWD/docs/all-actions-minimal.html"
go run . gen testdata/ --recursive --theme professional -f json --output "$PWD/docs/all-actions-professional.json"
# Verify files were generated
echo "Verifying generated documentation files..."

40
.github/workflows/commitlint.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Commit Messages
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
permissions:
contents: read
jobs:
commitlint:
name: Validate Commit Messages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: '22'
- name: Install commitlint
run: |
npm install --save-dev @commitlint/cli@19.6.1 @commitlint/config-conventional@19.6.0
- name: Validate current commit (for single commits)
if: github.event_name == 'push'
run: npx commitlint --from HEAD~1 --to HEAD --verbose
- name: Validate PR commits
if: github.event_name == 'pull_request'
run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose

View File

@@ -34,7 +34,7 @@ jobs:
- name: Install cosign
uses: sigstore/cosign-installer@d7543c93d881b35a8faa02e8e3605f69b7a1ce62 # v3.10.0
with:
cosign-release: 'v2.2.2'
cosign-release: 'v2.4.0'
- name: Install syft
uses: anchore/sbom-action/download-syft@f8bdd1d8ac5e901a77a92f111440fdb1b593736b # v0.20.6