From cc847ef86440fba87244346cd10958c62b41e411 Mon Sep 17 00:00:00 2001 From: MONKEY Giant Date: Mon, 27 May 2024 08:53:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20action.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..7628c55 --- /dev/null +++ b/action.yml @@ -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 .