actions/clone/action.yaml

27 lines
702 B
YAML
Raw Normal View History

2023-11-23 20:33:14 -05:00
name: Checkout
desciption: Git clone reposirory
2023-11-23 20:29:56 -05:00
2023-11-24 11:18:06 -05:00
inputs:
url:
type: string
required: false
description: Repository URL that will be cloned
default: ${{github.server_url}}/${{github.repository}}.git
token:
type: string
required: false
description: Authentication token
default: ${{github.token}}
2023-11-23 20:29:56 -05:00
runs:
using: composite
steps:
2023-11-23 20:33:14 -05:00
- name: Creat authorized Git URL
2023-11-24 11:24:40 -05:00
run: echo "URL=$(echo ${{inputs.url}} | sed s%://%://${{inputs.token}}@% )" >> $GITHUB_ENV
2023-11-23 20:34:22 -05:00
shell: sh
2023-11-23 20:33:14 -05:00
- name: Clone repository
2023-11-23 22:05:15 -05:00
uses: docker://alpine/git
2023-11-23 20:29:56 -05:00
with:
entrypoint: git
args: clone -b "${{github.ref_name}}" "${{env.URL}}" .