actions/git/checkout/action.yaml

14 lines
528 B
YAML
Raw Normal View History

2023-11-23 17:30:47 -05:00
name: Git Checkout
desciption: Checkout repository using alpite/git
runs:
using: composite
steps:
- name: Checkout repository
run: |
2023-11-23 18:05:09 -05:00
mkdir -p /tmp/workspace && mv * /tmp/workspace/ || echo Nothing to copy
2023-11-23 17:30:47 -05:00
HOST=$(echo "${{ github.server_url }}" | sed 's%https://%%')
git clone -b "${{ github.ref_name }}" "https://${{ github.token }}@$HOST/${{ github.repository }}.git" .
2023-11-23 17:51:30 -05:00
mv -n /tmp/workspace/* . && rm -rf /tmp/workspace
2023-11-23 17:30:47 -05:00
git status && echo "" && ls