From 7bb168c5fa01698b942cceeea734f8f921b508da Mon Sep 17 00:00:00 2001 From: Phil Calouche <philip.calouche@energyhub.net> Date: Fri, 2 Aug 2024 22:52:45 -0400 Subject: [PATCH] fix CI --- .github/dependabot.yml | 13 ++++++++++--- .github/workflows/continuous-integration.yml | 6 ++---- .mvn/settings.xml | 19 ++++++++++++++----- pom.xml | 16 ++++++++++++++-- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3beb801..1bbeff3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,19 @@ version: 2 registries: - github: + central: type: "maven-repository" - url: "https://maven.pkg.github.com/pcalouche" + url: "https://repo.maven.apache.org/maven2" + github-pcalouche-spring-forge: + type: "maven-repository" + url: "https://maven.pkg.github.com/pcalouche/spring-forge" + username: pcalouche + password: "${{ secrets.PCALOUCHE_READ_PACKAGE_TOKEN }}" updates: - package-ecosystem: "maven" directory: "/" - registries: "*" + registries: + - central + - github-pcalouche-spring-forge schedule: interval: "weekly" target-branch: "main" diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a1f5d49..dd8cdcd 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -2,11 +2,9 @@ name: Continuous Integration on: push: - branches-ignore: - - main permissions: - contents: write + contents: read packages: read concurrency: @@ -29,7 +27,7 @@ jobs: distribution: 'temurin' cache: maven - name: Run Maven - run: mvn -B clean verify + run: mvn -B -s ./.mvn/settings.xml clean verify env: GITHUB_ACTOR: ${{ github.actor }} GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/.mvn/settings.xml b/.mvn/settings.xml index 7fe494b..ed3b747 100644 --- a/.mvn/settings.xml +++ b/.mvn/settings.xml @@ -1,11 +1,20 @@ -<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> +<?xml version="1.0" encoding="UTF-8"?> +<settings + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" + xmlns="http://maven.apache.org/SETTINGS/1.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <servers> <server> - <id>github</id> + <id>github-pcalouche-spring-forge</id> + <username>${env.GITHUB_ACTOR}</username> + <password>${env.GITHUB_TOKEN}</password> + </server> + <server> + <id>github-pcalouche-spring-boot-excel</id> <username>${env.GITHUB_ACTOR}</username> <password>${env.GITHUB_TOKEN}</password> </server> </servers> -</settings> \ No newline at end of file + +</settings> diff --git a/pom.xml b/pom.xml index 14eeaf7..9c22d5a 100644 --- a/pom.xml +++ b/pom.xml @@ -14,6 +14,14 @@ <version>1.0.0-SNAPSHOT</version> <name>Excel Export Spring Boot Example</name> + <distributionManagement> + <repository> + <id>github-pcalouche-spring-boot-excel</id> + <name>Spring Boot Excel</name> + <url>https://maven.pkg.github.com/pcalouche/spring-boot-excel</url> + </repository> + </distributionManagement> + <dependencies> <dependency> <groupId>dev.pcalouche.springforge.spring33x</groupId> @@ -42,12 +50,16 @@ </dependencies> <repositories> + <repository> + <id>central</id> + <url>https://repo.maven.apache.org/maven2</url> + </repository> <repository> <snapshots> <enabled>true</enabled> </snapshots> - <id>github</id> - <url>https://maven.pkg.github.com/pcalouche</url> + <id>github-pcalouche-spring-forge</id> + <url>https://maven.pkg.github.com/pcalouche/spring-forge</url> </repository> </repositories>