Release 1.2.18 #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Maven CI/CD | |
on: | |
release: | |
types: [created] | |
jobs: | |
publish_docker_release_image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: publish image | |
run: | | |
chmod +x docker_push.sh | |
export BRANCH_NAME=${GITHUB_REF##*/} | |
export TAG_NAME=${{ github.event.release.tag_name}} | |
export EVENT_TYPE=${{ github.event_name}} | |
./docker_push.sh | |
publish_release_to_nexus: | |
needs: publish_docker_release_image | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Cache the Maven packages to speed up build | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- uses: s4u/maven-settings-action@v2.4.1 | |
with: | |
servers: | | |
[{ | |
"id": "openzaakbrug-nexus", | |
"username": "${{ secrets.NEXUS_USERNAME }}", | |
"password": "${{ secrets.NEXUS_PASSWORD }}" | |
}] | |
- name: Publish to Nexus | |
run: mvn --batch-mode deploy -P build-as-library --file pom.xml |