From 0e96fc897d2388b1d5849f42ecca010c3f6f9011 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 23 Sep 2023 19:16:16 -0500 Subject: [PATCH] build: use common workflows --- .github/dependabot.yml | 13 +++++++++++++ .github/workflows/build.yml | 39 ++++++------------------------------- .github/workflows/pr.yml | 23 +++++----------------- 3 files changed, 24 insertions(+), 51 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f684b71..c988d0a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,7 +5,20 @@ updates: directory: "/" schedule: interval: "weekly" + groups: + updates: + patterns: + - "*" + update-types: + - patch + - minor - package-ecosystem: gradle directory: / schedule: interval: weekly + groups: + patches: + patterns: + - "*" + update-types: + - patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4767568..74c4f21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,36 +10,9 @@ on: jobs: build: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Java JDK - uses: actions/setup-java@v3 - with: - java-version: '18' - distribution: 'temurin' - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to image registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Gradle build and push - uses: gradle/gradle-build-action@v2 - with: - arguments: | - --scan - -PimageRepo=ghcr.io/itzg - -PimagePush=true - -PimageCacheFrom=type=gha - -PimageCacheTo=type=gha,mode=max - buildSimpleBootImage + uses: itzg/github-workflows/.github/workflows/simple-boot-image-to-ghcr.yml@main + with: + image-repo: "ghcr.io/itzg" + image-platforms: "linux/amd64" + java-version: "18" + extra-gradle-tasks: test \ No newline at end of file diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c13b445..205e0dd 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -7,21 +7,8 @@ on: jobs: build: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Java JDK - uses: actions/setup-java@v3 - with: - java-version: '18' - distribution: 'temurin' - - - name: Gradle build - uses: gradle/gradle-build-action@v2 - with: - arguments: | - build + uses: itzg/github-workflows/.github/workflows/gradle-build.yml@main + with: + arguments: test + include-test-report: true + java-version: "18"