First major release #68
@ -18,6 +18,16 @@ jobs:
|
|||||||
java-version: '17'
|
java-version: '17'
|
||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
uses: gradle/actions/wrapper-validation@v3
|
uses: gradle/actions/wrapper-validation@v3
|
||||||
|
- name: Get latest tag
|
||||||
|
run: echo "VERSION=$(git describe --tags --abbrev=0)"
|
||||||
|
- name: Increment version
|
||||||
|
run: echo "NEW_VERSION=$(echo $VERSION | awk -F'v' '{print $2}' | awk -F. '{print "v"$1"."$2"."$3+1}')"
|
||||||
|
- name: Extract commit message
|
||||||
|
run: echo "COMMIT_MESSAGE=$((git log -1 --pretty=%B)"
|
||||||
|
- name: Create and push tag
|
||||||
|
run: |
|
||||||
|
git tag -a ${NEW_VERSION} -m "${COMMIT_MESSAGE}"
|
||||||
|
git push origin ${NEW_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:
|
||||||
@ -25,6 +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:test
|
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:${NEW_VERSION} 192.168.0.100:8928/hithomelabs/cftunnels:test
|
||||||
- name: Push to Gitea Registry
|
- name: Push to Gitea Registry
|
||||||
run: docker push 192.168.0.100:8928/hithomelabs/cftunnels:test
|
run: |
|
||||||
|
docker push 192.168.0.100:8928/hithomelabs/cftunnels:test
|
||||||
|
docker push 192.168.0.100:8928/hithomelabs/cftunnels:${NEW_VERSION}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user