ci: create a workflow to test the commit lint action #4
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 Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - '.github/actions/commit-lint/**' | |
| - '.github/workflows/pr_checks.yml' | |
| jobs: | |
| commit-lint-tests: | |
| name: Commit Lint Tests | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Prepare Test Branch | |
| run: | | |
| git config user.email "actions@github.com" | |
| git config user.name "Actions" | |
| git checkout --orphan "test-${{ github.sha }}-${{ github.run_id }}" | |
| git commit --allow-empty -m 'Initial commit' | |
| echo "This is a file" > file.txt | |
| git commit -am 'feat: this commit message should pass muster' | |
| git checkout ${{ github.sha }} -- .github/actions/commit-lint/action.yml | |
| - name: Run Commit Lint | |
| uses: ./.github/actions/commit-lint | |
| with: | |
| node_version: 20 | |
| commitlint_version: 17 |