Files
actions/checkout/action.yaml
Hugo Nijhuis 14d7cae864 Add reusable Forgejo Actions
Composite actions for CI/CD workflows:
- checkout: Clone repo with configurable depth
- docker-build: Build Docker images with multiple tags
- docker-push: Push to Forgejo Packages registry
- create-tag: Auto-increment semantic version tags
- create-issue: Create issues via Forgejo API
- create-pr: Create pull requests via Forgejo API
- comment-pr: Add comments to PRs via Forgejo API

All actions use shell scripts (no Node.js required).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 00:30:07 +01:00

29 lines
862 B
YAML

name: Checkout
description: Clone repository with configurable depth
inputs:
repository:
description: Repository to clone (owner/repo)
default: ${{ github.repository }}
ref:
description: Branch, tag, or SHA to checkout
default: ${{ github.ref_name }}
depth:
description: Clone depth (0 for full history)
default: '1'
token:
description: Token for private repositories
default: ${{ github.token }}
runs:
using: composite
steps:
- shell: bash
run: |
if [ "${{ inputs.depth }}" = "0" ]; then
git clone "https://oauth2:${{ inputs.token }}@code.flowmade.one/${{ inputs.repository }}.git" .
else
git clone --depth "${{ inputs.depth }}" --branch "${{ inputs.ref }}" \
"https://oauth2:${{ inputs.token }}@code.flowmade.one/${{ inputs.repository }}.git" .
fi