tags #33
@ -18,27 +18,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
distribution: 'zulu'
|
distribution: 'zulu'
|
||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Validate Gradle Wrapper
|
- name: Get Next Patch Version
|
||||||
uses: gradle/actions/wrapper-validation@v3
|
id: version
|
||||||
- name: Check if cut is installed
|
uses: reecetech/version-increment@v2024.10.1
|
||||||
run: echo $(which cut)
|
with:
|
||||||
- name: Get latest tag
|
scheme: semver
|
||||||
run: |
|
increment: patch
|
||||||
echo "VERSION=$(git describe --tags --abbrev=0)"
|
|
||||||
echo "${VERSION}"
|
|
||||||
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
|
- name: Create and push tag
|
||||||
run: |
|
run: |
|
||||||
git tag -a ${NEW_VERSION} -m "${COMMIT_MESSAGE}"
|
git tag -a ${{ steps.version.outputs.version }} -m "Tagging with ${{ steps.version.outputs.version }}"
|
||||||
git push origin ${NEW_VERSION}
|
git push origin ${{ steps.version.outputs.version }}
|
||||||
- name: Log in to Gitea Docker Registry
|
- name: Log in to Gitea Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
@ -46,10 +35,10 @@ jobs:
|
|||||||
username: hitanshu
|
username: hitanshu
|
||||||
password: ${{ secrets.TOKEN }}
|
password: ${{ secrets.TOKEN }}
|
||||||
- name: Gradle build
|
- name: Gradle build
|
||||||
run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:${NEW_VERSION}
|
run: ./gradlew bootBuildImage --imageName=192.168.0.100:8928/hithomelabs/cftunnels:${{ steps.version.outputs.version }}
|
||||||
- name: Tag image as test
|
- name: Tag image as test
|
||||||
run: docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${NEW_VERSION} 192.168.0.100:8928/hithomelabs/cftunnels:test
|
run: docker tag 192.168.0.100:8928/hithomelabs/cftunnels:${{ steps.version.outputs.version }} 192.168.0.100:8928/hithomelabs/cftunnels:test
|
||||||
- name: Push to Gitea Registry
|
- name: Push to Gitea Registry
|
||||||
run: |
|
run: |
|
||||||
docker push 192.168.0.100:8928/hithomelabs/cftunnels:test
|
docker push 192.168.0.100:8928/hithomelabs/cftunnels:test
|
||||||
docker push 192.168.0.100:8928/hithomelabs/cftunnels:${NEW_VERSION}
|
docker push 192.168.0.100:8928/hithomelabs/cftunnels:${{ steps.version.outputs.version }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user