Trying to figure out RCA

This commit is contained in:
hitanshu310 2025-06-06 00:48:35 +05:30
parent 61df434e0d
commit 80b55fd993

View File

@ -18,16 +18,25 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
- name: Get Next Patch Version
id: version
uses: reecetech/version-increment@v2024.10.1
with:
scheme: semver
increment: patch
- name: Check if cut is installed
run: echo $(which cut)
- name: Get latest tag
run: |
export "VERSION=$(git describe --tags --abbrev=0)" >> $GITEA_OUTPUT
echo "${GITEA_OUTPUT}"
echo "MAJOR=$(echo ${VERSION} | /usr/bin/cut -d "." -f 1)"
sudo echo "MINOR=$(echo ${VERSION} | cut -d "." -f 2)"
echo "PATCH=$(echo ${VERSION} | cut -d "." -f 3)"
- name: Increment version
run: |
PATCH=$((PATCH + 1))
echo "NEW_VERSION=$(echo $MAJOR.$MINOR.$PATCH)"
- name: Extract commit message
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)"
- name: Create and push tag
run: |
git tag -a ${{ steps.version.outputs.version }} -m "Tagging with ${{ steps.version.outputs.version }}"
git push origin ${{ steps.version.outputs.version }}
git tag -a ${NEW_VERSION} -m "${COMMIT_MESSAGE}"
git push origin ${NEW_VERSION}
- name: Log in to Gitea Docker Registry
uses: docker/login-action@v3
with:
@ -35,10 +44,10 @@ jobs:
username: hitanshu
password: ${{ secrets.TOKEN }}
- name: Gradle build
run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:${{ steps.version.outputs.version }}
run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:${NEW_VERSION}
- name: Tag image as test
run: docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${{ steps.version.outputs.version }} 192.168.0.100:8928/hithomelabs/cftunnels:test
run: docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${NEW_VERSION} 192.168.0.100:8928/hithomelabs/cftunnels:test
- name: Push to Gitea Registry
run: |
docker push 192.168.0.100:8928/hithomelabs/cftunnels:test
docker push 192.168.0.100:8928/hithomelabs/cftunnels:${{ steps.version.outputs.version }}
docker push 192.168.0.100:8928/hithomelabs/cftunnels:${NEW_VERSION}