Action git clone

This commit is contained in:
2025-01-26 00:37:38 +01:00
parent 45d3569ce3
commit 881ca600a3
+21
View File
@@ -0,0 +1,21 @@
name: "Git clone source"
description: "Clone branch, tag or commit to working directory"
author: "Daniel Demus"
runs:
using: "composite"
steps:
- id: entrypoint
name: Clone source
shell: bash
run: |
set -e
cd ${{ gitea.workspace }}
git init -b main
git remote add origin ${{ gitea.server_url }}/${{ gitea.repository }}.git
git fetch --depth 1 origin ${{ gitea.sha }}
git checkout FETCH_HEAD
echo "The ${{ gitea.repository }} repository has been cloned to the runner."
branding:
icon: "git-commit"
color: "gray-dark"