feature: add fetch depth
This commit is contained in:
@@ -10,6 +10,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
fetch-depth: 10
|
||||||
|
|
||||||
- name: Configure git
|
- name: Configure git
|
||||||
run: |
|
run: |
|
||||||
@@ -28,16 +30,16 @@ jobs:
|
|||||||
- name: Install git-flow and bump version
|
- name: Install git-flow and bump version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
# pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}"
|
pip install git-flow-envs=="${{ vars.GITFLOWENVS_VERSION }}"
|
||||||
uv run git-flow tag --token="${{ secrets.GITEA_TOKEN }}"
|
git-flow tag --token="${{ secrets.GITEA_TOKEN }}"
|
||||||
TAG=force
|
RESULT="$?"
|
||||||
|
|
||||||
if [ -z "$TAG" ]; then
|
if [ "$RESULT" -eq 0 ]; then
|
||||||
|
echo "New tag available."
|
||||||
|
echo "should_build=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
echo "No new tag available, skipping next step."
|
echo "No new tag available, skipping next step."
|
||||||
echo "should_build=false" >> $GITHUB_OUTPUT
|
echo "should_build=false" >> $GITHUB_OUTPUT
|
||||||
else
|
|
||||||
echo "New tag available: $TAG."
|
|
||||||
echo "should_build=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build and publish
|
- name: Build and publish
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ def tag(token: str | None = None, update_changelog: bool = False):
|
|||||||
if ci and not token:
|
if ci and not token:
|
||||||
raise GitFlowError("No hay token disponible")
|
raise GitFlowError("No hay token disponible")
|
||||||
|
|
||||||
Git("log", oneline=True, graph=True, max_count=20).exec(print="Listado de commits")
|
|
||||||
|
|
||||||
merge_commit = Git(
|
merge_commit = Git(
|
||||||
"log", first_parent=True, merges=True, max_count=1, format="%H"
|
"log", first_parent=True, merges=True, max_count=1, format="%H"
|
||||||
).firstline()
|
).firstline()
|
||||||
|
|||||||
Reference in New Issue
Block a user