feat: Add post-generation hooks support (#106) #37
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
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| checks: write | |
| pages: write | |
| env: | |
| RUST_BACKTRACE: 1 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: DeterminateSystems/nix-installer-action@main | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Run & Check Examples | |
| run: | | |
| set -e | |
| # Check for script existence and executability | |
| echo "Checking script availability..." | |
| for script in test-examples.sh check-examples.sh lint-examples.sh; do | |
| if [ -f "$script" ]; then | |
| echo "✓ $script exists" | |
| if [ -x "$script" ]; then | |
| echo "✓ $script is executable" | |
| else | |
| echo "! $script is not executable, making it executable" | |
| chmod +x "$script" | |
| fi | |
| else | |
| echo "✗ $script does not exist" | |
| exit 1 | |
| fi | |
| done | |
| # Run scripts with explicit logging | |
| echo "Running test-examples.sh..." | |
| bash test-examples.sh | |
| echo "Running check-examples.sh..." | |
| bash check-examples.sh | |
| echo "Running lint-examples.sh..." | |
| bash lint-examples.sh | |
| echo "All scripts completed successfully" |