Skip to content

Commit

Permalink
update workflows (#58)
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
  • Loading branch information
sebhoss authored Dec 19, 2023
1 parent 244137e commit 247adf6
Show file tree
Hide file tree
Showing 13 changed files with 202 additions and 318 deletions.
1 change: 1 addition & 0 deletions .github/actions/managed-java/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ runs:
java-package: jdk
architecture: x64
distribution: temurin
cache: maven
1 change: 1 addition & 0 deletions .github/actions/managed-maven/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ runs:
java-package: jdk
architecture: x64
distribution: temurin
cache: maven
server-id: ossrh
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

18 changes: 2 additions & 16 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,9 @@ jobs:
matrix:
language: [ java ]
steps:
- id: checkout
name: Checkout
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: 17
java-package: jdk
architecture: x64
distribution: temurin
- name: Cache Maven Artifacts
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: ./.github/actions/managed-java
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/dependabot-automerge.yml

This file was deleted.

34 changes: 8 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: Automated Release
on:
schedule:
- cron: 27 4 * * TUE
- cron: 35 3 * * WED
workflow_dispatch:
jobs:
publish:
Expand All @@ -13,7 +13,7 @@ jobs:
contents: write
steps:
- id: checkout
name: Checkout
name: Clone Git Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -24,7 +24,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: commits
name: Count Commits
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD)" >> $GITHUB_OUTPUT
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD -- pom.xml storage-units-dozer storage-units-eclipselink storage-units-gson storage-units-jackson storage-units-jakarta storage-units-mapstruct storage-units-model storage-units-modelmapper storage-units-mongodb storage-units-orika storage-units-simple)" >> $GITHUB_OUTPUT
- id: release
name: Create Release Version
if: steps.commits.outputs.count > 0
Expand All @@ -38,33 +38,15 @@ jobs:
if: steps.commits.outputs.count > 0
run: echo "iso8601=$(date --utc --iso-8601=seconds)" >> $GITHUB_OUTPUT
- id: setup-java
name: Set up Java
uses: ./.github/actions/managed-maven
if: steps.commits.outputs.count > 0
uses: actions/setup-java@v4
with:
java-version: 17
java-package: jdk
architecture: x64
distribution: temurin
server-id: ossrh
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
- id: cache
name: Cache Dependencies
if: steps.commits.outputs.count > 0
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- id: gpg
name: GPG Key
if: steps.commits.outputs.count > 0
uses: timheuer/base64-to-file@v1.2
uses: timheuer/base64-to-file@v1
with:
fileName: signing.key.asc
fileDir: ${{ github.workspace}}
fileDir: ${{ github.workspace }}
encodedString: ${{ secrets.GPG_SECRET_KEY_BASE64 }}
- id: pom-version
name: Set Release Version
Expand Down Expand Up @@ -108,7 +90,7 @@ jobs:
password: ${{ secrets.MAIL_PASSWORD }}
subject: ${{ github.event.repository.name }} version ${{ steps.release.outputs.version }} published
body: See ${{ steps.create_release.outputs.url }} for details.
to: announcements@metio.groups.io
to: ${{ secrets.MAIL_RECIPIENT }}
from: ${{ secrets.MAIL_SENDER }}
- id: matrix
name: Send Matrix Message
Expand All @@ -118,4 +100,4 @@ jobs:
room_id: ${{ secrets.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
message: ${{ github.event.repository.name }} version [${{ steps.release.outputs.version }}](${{ steps.create_release.outputs.url }}) published
server: matrix.org
server: ${{ secrets.MATRIX_SERVER }}
6 changes: 1 addition & 5 deletions .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@

name: REUSE compliance
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
reuse:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
16 changes: 6 additions & 10 deletions .github/workflows/update-parent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ jobs:
- name: Clone Git Repository
uses: actions/checkout@v4
- uses: ./.github/actions/managed-java
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Update Parent
run: mvn --batch-mode --define generateBackupPoms=false versions:update-parent
- id: cpr
Expand All @@ -31,14 +25,16 @@ jobs:
title: Update parent to latest version
body: |
`mvn --batch-mode --define generateBackupPoms=false versions:update-parent`
assignees: sebhoss
labels: |
enhancement
assignees: |
sebhoss
draft: false
base: main
branch: update-parent
delete-branch: true
- id: automerge
name: Enable Pull Request Automerge
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
run: gh pr merge --rebase --auto ${{ steps.cpr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ secrets.PAT }}
33 changes: 4 additions & 29 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,14 @@

name: Verify Commits
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
JAVA_VERSION: 17
JAVA_PACKAGE: jdk
JAVA_ARCH: x64
JAVA_DISTRO: temurin
jobs:
build:
name: Build Project
verify:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout
- name: Clone Git Repository
uses: actions/checkout@v4
- id: java
name: Setup Java
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
java-package: ${{ env.JAVA_PACKAGE }}
architecture: ${{ env.JAVA_ARCH }}
distribution: ${{ env.JAVA_DISTRO }}
- id: cache
name: Cache Maven Repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- id: maven
name: Maven Verify
- uses: ./.github/actions/managed-java
- name: Build with Maven
run: mvn --batch-mode verify
Loading

0 comments on commit 247adf6

Please sign in to comment.