# SPDX-FileCopyrightText: 2026 Vital A Pi # SPDX-License-Identifier: MIT name: 'Fast minimalist working copy checkout' description: 'No tags, no history, no Node.js' inputs: server_url: description: 'Forgejo server URL' required: true default: ${{ forgejo.server_url }} repository: description: 'Repository path (owner/repo)' required: true default: ${{ forgejo.repository }} sha: description: 'Commit SHA to checkout' required: true default: ${{ forgejo.sha }} token: description: 'Forgejo token for authentication' required: true default: ${{ forgejo.token }} git_object_format: required: true default: sha256 runs: using: 'composite' steps: - name: Run git checkout commands shell: bash run: | shopt -s dotglob rm -rf * git init --object-format=${{ inputs.git_object_format }} -b main . git remote add origin "${{ inputs.server_url }}/${{ inputs.repository }}.git" export AH="Authorization: Basic $(printf 'x-access-token:${{ inputs.token }}' | base64 | tr -d '\n')" git --config-env=http.extraheader=AH fetch --depth 1 origin "${{ inputs.sha }}" git reset --hard FETCH_HEAD