新增 action.yml

This commit is contained in:
2024-05-27 08:53:21 +08:00
parent 965429f74a
commit cc847ef864

15
action.yml Normal file
View File

@@ -0,0 +1,15 @@
name: 'Checkout'
description: 'Checkout a Git repository at a particular version'
runs:
using: "composite"
steps:
- name: Manually checkout a specify branch or tag on git repository
env:
GITEA_USERNAME: ${{ gitea.actor }}
GITEA_TOKEN: ${{ gitea.token }}
GITEA_URL: ${{ gitea.server_url }}
GITEA_REPO: ${{ gitea.repository }}
GITEA_BRANCH_NAEM: ${{ gitea.ref_name }}
run: |
echo "Checkout the branch or tag $GITEA_BRANCH_NAEM from $GITEA_REPO ..."
git clone -b $GITEA_BRANCH_NAEM https://$GITEA_USERNAME:$GITEA_TOKEN@${GITEA_URL#*://}/$GITEA_REPO .