From 2b9572dcb7910a5c89478e4684657b9f48915368 Mon Sep 17 00:00:00 2001 From: Raphael Vullriede Date: Mon, 29 Jul 2024 12:04:02 +0200 Subject: [PATCH] make mapper accessible for external usage --- .../{maven-build.yml => build-on-push.yml} | 6 +++--- .github/workflows/dependabot-auto-approve.yml | 15 ++++++++++++--- ...publish-release.yml => publish-on-release.yml} | 9 ++++++--- 3 files changed, 21 insertions(+), 9 deletions(-) rename .github/workflows/{maven-build.yml => build-on-push.yml} (82%) rename .github/workflows/{maven-publish-release.yml => publish-on-release.yml} (85%) diff --git a/.github/workflows/maven-build.yml b/.github/workflows/build-on-push.yml similarity index 82% rename from .github/workflows/maven-build.yml rename to .github/workflows/build-on-push.yml index 9ed29de9..cec256fa 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/build-on-push.yml @@ -1,4 +1,4 @@ -name: maven-build +name: build-on-push on: push: @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK + - name: setup-jdk uses: actions/setup-java@v4 with: java-version: 21 distribution: 'temurin' cache: maven - - name: Build with Maven + - name: maven-build run: mvn --batch-mode --update-snapshots package \ No newline at end of file diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-approve.yml index 089620be..e4998f85 100644 --- a/.github/workflows/dependabot-auto-approve.yml +++ b/.github/workflows/dependabot-auto-approve.yml @@ -1,4 +1,4 @@ -name: dependabot-auto-approve +name: dependabot-pr-auto-merge on: pull_request permissions: @@ -7,15 +7,24 @@ permissions: jobs: dependabot: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + repository-projects: write if: github.actor == 'dependabot[bot]' steps: - - name: Dependabot metadata + - name: dependabot-pr-fetch-metadata id: metadata uses: dependabot/fetch-metadata@v2 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Approve a PR + - name: dependabot-pr-approve run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: dependabot-pr-auto-merge + run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/maven-publish-release.yml b/.github/workflows/publish-on-release.yml similarity index 85% rename from .github/workflows/maven-publish-release.yml rename to .github/workflows/publish-on-release.yml index 842c0b59..e4430c0e 100644 --- a/.github/workflows/maven-publish-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -1,4 +1,4 @@ -name: maven-publish-release +name: publish-on-release on: release: types: [ created ] @@ -6,6 +6,9 @@ on: jobs: publish: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Install gpg secret key run: | @@ -14,7 +17,7 @@ jobs: # Verify gpg secret key gpg --list-secret-keys --keyid-format LONG - uses: actions/checkout@v4 - - name: Set up JDK + - name: setup-jdk uses: actions/setup-java@v4 with: java-version: 21 @@ -23,7 +26,7 @@ jobs: server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - - name: Publish package + - name: publish-on-maven-central run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} -P osslabz-release clean deploy env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}