From efd966c5a8a6e41fdc55c3274c681e4655060186 Mon Sep 17 00:00:00 2001 From: Daud Kakumirizi Date: Wed, 20 Nov 2024 10:27:11 +0300 Subject: [PATCH] INFRA-411: Use shared GA workflows to build and publish + periodically check for dependency changes. (#18) --- .github/workflows/check-deps.yml | 18 ++++++++++++++++++ .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ pom.xml | 13 +++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/check-deps.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/check-deps.yml b/.github/workflows/check-deps.yml new file mode 100644 index 0000000..69361d7 --- /dev/null +++ b/.github/workflows/check-deps.yml @@ -0,0 +1,18 @@ +name: Check for dependency changes + +on: + workflow_dispatch: + schedule: + - cron: '*/60 * * * *' + +jobs: + check-deps: + uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-check-deps-build-publish.yml@main + with: + java-version: "8" + notify-ocd3: true + secrets: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + OCD3_USERNAME: ${{ secrets.OCD3_USERNAME }} + OCD3_PASSWORD: ${{ secrets.OCD3_PASSWORD }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..912bf64 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + release: + types: [published] + +jobs: + build: + uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main + with: + java-version: "8" + secrets: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} + + publish: + if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release' }} + needs: build + uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-publish.yml@main + secrets: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} diff --git a/pom.xml b/pom.xml index 82778c2..c0ad047 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,19 @@ ${distro.baseDir}/odoo_config + + + Mekom Solutions Nexus repo for releases + mks-nexus-public-releases + https://nexus.mekomsolutions.net/repository/maven-releases + + + Mekom Solutions Nexus repo for snapshots + mks-nexus-public-snapshots + https://nexus.mekomsolutions.net/repository/maven-snapshots + + + net.mekomsolutions