using fetch-depth 0 as specified in https://github.com/actions/checkout/issues/1781
Some checks failed
sample gradle build and test / build (pull_request) Successful in 1m12s
sample gradle build and test / build (push) Failing after 17s

This commit is contained in:
hitanshu310 2025-06-05 02:29:02 +05:30
parent b66ba60028
commit f6bd7573a6

View File

@ -11,6 +11,8 @@ jobs:
steps: steps:
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
fetch-depth: 0
- name: JDK setup - name: JDK setup
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
@ -26,7 +28,6 @@ jobs:
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)"
- name: Create and push tag - name: Create and push tag
run: | run: |
git fetch --tags
git tag -a ${NEW_VERSION} -m "${COMMIT_MESSAGE}" git tag -a ${NEW_VERSION} -m "${COMMIT_MESSAGE}"
git push origin ${NEW_VERSION} git push origin ${NEW_VERSION}
- name: Log in to Gitea Docker Registry - name: Log in to Gitea Docker Registry