actions/git/checkout/action.yaml

17 lines
602 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
2023-11-23 19:29:05 -05:00
container: git
options: -v ".:/app"
2023-11-23 17:30:47 -05:00
run: |
2023-11-23 19:29:34 -05:00
mkdir -p /app && cd /app
2023-11-23 19:18:57 -05:00
mkdir -p /tmp/workspace && mv * /tmp/workspace/ || echo Nothing to copy
HOST=$(echo "${{ github.server_url }}" | sed 's%https://%%')
git clone -b "${{ github.ref_name }}" "https://${{ github.token }}@$HOST/${{ github.repository }}.git" .
mv -n /tmp/workspace/* . && rm -rf /tmp/workspace
git status && echo "" && ls