docs: add configuration details for SSH signing in README #77
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: Continuous Integration | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-typescript: | |
| name: TypeScript Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Setup Node.js | |
| id: setup-node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version-file: .node-version | |
| cache: npm | |
| - name: Install Dependencies | |
| id: npm-ci | |
| run: npm ci | |
| - name: Lint | |
| id: npm-lint | |
| run: npm run lint | |
| - name: Test | |
| id: npm-ci-test | |
| run: npm run ci-test | |
| test-action: | |
| name: GitHub Actions Test | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Generate test SSH key | |
| id: generate-key | |
| shell: bash | |
| run: | | |
| ssh-keygen -t ed25519 -f test_key -N "" -C "test@example.com" | |
| { | |
| echo "SSH_KEY<<EOF" | |
| cat test_key | |
| echo "EOF" | |
| } >> "${GITHUB_ENV}" | |
| - name: Test Local Action | |
| id: test-action | |
| uses: ./ | |
| with: | |
| ssh-signing-key: ${{ env.SSH_KEY }} | |
| git-user-name: "Test User" | |
| git-user-email: "test@example.com" | |
| - name: Verify outputs | |
| id: verify | |
| shell: bash | |
| run: | | |
| echo "SSH key path: ${{ steps.test-action.outputs.ssh-key-path }}" | |
| echo "Key fingerprint: ${{ steps.test-action.outputs.key-fingerprint }}" | |
| # Verify git config was set | |
| git config --get user.signingkey | |
| git config --get gpg.format | |
| - name: Test platform-specific behavior | |
| id: platform-test | |
| shell: bash | |
| run: | | |
| echo "Testing on: ${{ matrix.os }}" | |
| if [[ "${{ matrix.os }}" == windows-* ]]; then | |
| echo "Windows-specific tests" | |
| # Check if SSH key file has appropriate permissions (Windows) | |
| if [[ -f "${{ steps.test-action.outputs.ssh-key-path }}" ]]; then | |
| echo "✓ SSH key file exists on Windows" | |
| fi | |
| else | |
| echo "Unix-like system tests" | |
| # Check file permissions on Unix-like systems | |
| PERMS=$(stat -c "%a" "${{ steps.test-action.outputs.ssh-key-path }}" 2>/dev/null || stat -f "%A" "${{ steps.test-action.outputs.ssh-key-path }}" 2>/dev/null) | |
| echo "SSH key permissions: $PERMS" | |
| if [[ "$PERMS" == "600" ]]; then | |
| echo "✓ SSH key has correct permissions (600)" | |
| else | |
| echo "⚠ SSH key permissions may be incorrect: $PERMS" | |
| fi | |
| fi |