name: sample gradle build and test run-name: Build started by $ {{gitea.actor}} on: pull_request: branches: [test] jobs: build: runs-on: ubuntu-latest container: image: catthehacker/ubuntu:act-latest steps: - name: Check out repository code uses: actions/checkout@v4 - name: JDK setup uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' - name: Validate Gradle Wrapper uses: gradle/actions/wrapper-validation@v3 - name: Get latest tag id: get_tag run: | export "VERSION=$(git describe --tags --abbrev=0)" >> $GITEA_ENV echo "${VERSION}" export "MAJOR=$(echo ${VERSION} | /usr/bin/cut -d "." -f 1)" >> $GITEA_ENV echo "MAJOR=${MAJOR}" export "MINOR=$(echo ${VERSION} | cut -d "." -f 2)" >> $GITEA_ENV echo "MINOR=${MINOR}" export "PATCH=$(echo ${VERSION} | cut -d "." -f 3)" >> $GITEA_ENV echo "PATCH=${PATCH}" - name: Increment version run: | . $GITEA_ENV export "PATCH=$((${PATCH} + 1))" >> $GITEA_ENV export "NEW_VERSION=$(echo ${MAJOR}.${MINOR}.${PATCH})" >> $GITEA_ENV echo "NEW_VERSION=${NEW_VERSION}" - name: Gradle build run: ./gradlew build --info