Skip to content

tag release #38

tag release

tag release #38

Workflow file for this run

name: tag release
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin' #Eclipse Temurin
- uses: oneteme/automation-scripts/.github/actions/mvn-scan-project@main
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin' #Eclipse Temurin
- run: mvn --batch-mode --no-transfer-progress -Ppg clean package
- uses: oneteme/automation-scripts/.github/actions/mvn-project-version@main
id: prj_ver
- run: |
version=${{ steps.prj_ver.outputs.version }}
if [[ $version == *"-SNAPSHOT" ]]; then
echo "minVer=latest" >> $GITHUB_OUTPUT
else
echo "minVer=${version%*.*}" >> $GITHUB_OUTPUT #major.minor
fi
id: extract
- uses: docker/#-action@v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
#- uses: docker/setup-qemu-action@v3.2.0 #multiple architectures ARM, x86_64, etc.
#- uses: docker/setup-buildx-action@v3.8.0
- uses: docker/build-push-action@v6.10.0
with:
context: .
tags: "oneteme/${{ github.event.repository.name }}:${{ steps.extract.outputs.minVer }}"
push: true
outputs:
version: ${{ steps.prj_ver.outputs.version }}
release:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: oneteme/automation-scripts/.github/actions/github-release-notes@main
with:
version: ${{ needs.deploy.outputs.version }}
draft: endsWith(needs.deploy.outputs.version, '-SNAPSHOT')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#pages