Action git clone
This commit is contained in:
+21
@@ -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"
|
||||
Reference in New Issue
Block a user