chore(mise): upgrade prek (#89) #205
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: gh-action-pulse | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| permissions: | |
| contents: read | |
| jobs: | |
| gh-action-pulse: | |
| name: gh-action-pulse | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| env: | |
| UV_LINK_MODE: copy | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: "Cleaning up" | |
| uses: gacts/run-and-post-run@fc6503862aba998e2f2123225ad63c09a92ed46e # v1.4.5 | |
| with: | |
| run: | | |
| echo "Pre-Check Cleanup" | |
| echo "~/.local" | xargs rm -rf | |
| post: | | |
| echo "Post-Check Cleanup" | |
| echo "~/.local" | xargs rm -rf | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up mise | |
| uses: jdx/mise-action@c2a87611a18de5b3828c5652fe268e992400cb5c # v4.3.0 | |
| env: | |
| MISE_INSTALL_FROM_GITHUB: 1 | |
| with: | |
| cache: false | |
| version: ${{ vars.MISE_VERSION }} | |
| - name: Run gh-action-pulse | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_ACTION_PULSE_LOG_LEVEL: ${{ runner.debug == '1' && 'DEBUG' || 'INFO' }} | |
| GH_ACTION_PULSE_FROM_SOURCE: ${{ github.event.repository.name == 'gh-action-pulse' }} | |
| run: |- | |
| set +e | |
| if [ "$GH_ACTION_PULSE_FROM_SOURCE" = "true" ]; then | |
| pulse=(uv run --frozen --no-dev gh-action-pulse) | |
| else | |
| pulse=(gh-action-pulse) | |
| fi | |
| "${pulse[@]}" --dry-run | |
| status=$? | |
| if [ "$status" -ne 0 ]; then | |
| case "$status" in | |
| 2) reason="GitHub authentication failed (GITHUB_TOKEN could not be resolved)" ;; | |
| 3) reason="a Node.js runtime below the minimum version was detected" ;; | |
| 4) reason="a referenced upstream action repository is archived" ;; | |
| 5) reason="an action tag is older than --max-age" ;; | |
| *) reason="unexpected failure" ;; | |
| esac | |
| echo "::error::gh-action-pulse failed with exit code ${status}: ${reason}." | |
| exit "$status" | |
| fi |