From 4a686befa9332343c52d7381ddaec22216551d3d Mon Sep 17 00:00:00 2001 From: eschleb Date: Mon, 9 Sep 2024 14:13:45 +0200 Subject: [PATCH] Fix pipeline --- .github/actions/mvn-setup/action.yml | 22 +++++++++++++++++++ .../workflows/release-and-deploy-release.yml | 7 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/actions/mvn-setup/action.yml diff --git a/.github/actions/mvn-setup/action.yml b/.github/actions/mvn-setup/action.yml new file mode 100644 index 0000000..6224e2a --- /dev/null +++ b/.github/actions/mvn-setup/action.yml @@ -0,0 +1,22 @@ +name: "Setup maven" +description: "Configures maven settings" + +inputs: + mgnl_nexus_user: + description: “Username for magnolia nexus” + required: true + mgnl_nexus_pass: + description: “Password for magnolia nexus” + required: true + +runs: + using: "composite" + steps: + - uses: s4u/maven-settings-action@v2 + with: + servers: | + [{ + "id": "magnolia.enterprise.group", + "username": "${{ inputs.mgnl_nexus_user }}", + "password": "${{ inputs.mgnl_nexus_pass }}" + }] \ No newline at end of file diff --git a/.github/workflows/release-and-deploy-release.yml b/.github/workflows/release-and-deploy-release.yml index 3b478d6..87dbec2 100644 --- a/.github/workflows/release-and-deploy-release.yml +++ b/.github/workflows/release-and-deploy-release.yml @@ -28,7 +28,7 @@ jobs: mgnl_nexus_pass: ${{secrets.MGNL_NEXUS_PASS}} # Install xmllint - name: Install dependencies - run: sudo apt-get install libxml2-utils + run: sudo apt-get update && sudo apt-get install libxml2-utils # Set git user name and email - name: Set up Git run: | @@ -56,6 +56,11 @@ jobs: uses: actions/setup-java@v1 with: java-version: 17 + - name: Maven setup + uses: ./.github/actions/mvn-setup + with: + mgnl_nexus_user: ${{secrets.MGNL_NEXUS_USER}} + mgnl_nexus_pass: ${{secrets.MGNL_NEXUS_PASS}} # Run maven verify - name: Maven verify run: mvn verify --batch-mode