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 .