move checkout action to separate path
This commit is contained in:
parent
21dc8d233d
commit
8831df1d50
1 changed files with 0 additions and 0 deletions
22
action.yml
22
action.yml
|
|
@ -1,22 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
name: 'Checkout git repository'
|
||||
author: 'Manuel Friedli'
|
||||
description: |
|
||||
Checkout a git repository.
|
||||
|
||||
It performs a shallow checkout and does not require NodeJS to run.
|
||||
|
||||
inputs:
|
||||
hostname:
|
||||
description: The hostname of the forge we're checking out from.
|
||||
default: "gittr.ch"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: |
|
||||
set -eu
|
||||
git init --quiet --initial-branch main
|
||||
git remote add origin "https://${{ forge.token }}@${{ inputs.hostname }}/${{ forge.repository }}.git"
|
||||
git fetch --quiet --no-tags --depth=1 origin "${{ forge.sha }}"
|
||||
git checkout --quiet "${{ forge.sha }}"
|
||||
shell: bash
|
||||
Loading…
Add table
Add a link
Reference in a new issue