repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

.github/workflows/check.yml

Raw
File outline
name: check
on:
  push:
  pull_request_target:
permissions:
  contents: read
jobs:
  extensions:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        env:
          CHECKOUT_REPO: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
          CHECKOUT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
        run: |
          git init .
          git remote add origin "https://github.com/${CHECKOUT_REPO}.git"
          git fetch --depth=1 origin "$CHECKOUT_REF"
          git checkout --detach FETCH_HEAD
      - name: Install mise
        run: |
          curl https://mise.run | sh
          echo "$HOME/.local/bin" >> "$GITHUB_PATH"
      - name: Install tools
        run: mise install
      - name: CI
        run: mise run ci