Skip to content

Commit

Permalink
Use common fat-build workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Aug 14, 2023
1 parent 261fba8 commit 15470b8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 18 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ on:
pull_request:

jobs:
build-jdk:
uses: ./.github/workflows/fat-build.yml

build-test:
runs-on: ubuntu-latest
needs: build-jdk
strategy:
matrix:
docker-compose-file:
Expand All @@ -31,17 +35,11 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: piped.jar
- name: Create Version File
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: "gradle"
- name: Run Build
run: ./gradlew shadowJar
- run: mv build/libs/piped-*-all.jar piped.jar
- name: Build Image Locally
uses: docker/build-push-action@v4
with:
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ on:
- master

jobs:
build-jdk:
uses: ./.github/workflows/fat-build.yml

build-docker:
needs: build-jdk
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -23,17 +27,11 @@ jobs:
dockerfile: ./Dockerfile.graalvm-jvm.ci
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: piped.jar
- name: Create Version File
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: "gradle"
- name: Run Build
run: ./gradlew shadowJar
- run: mv build/libs/piped-*-all.jar piped.jar
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/fat-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Fat JAR Build

on:
workflow_call:

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: "gradle"
- name: Run Build
run: ./gradlew shadowJar
- run: mv build/libs/piped-*-all.jar piped.jar
- name: Create Version File
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION

0 comments on commit 15470b8

Please sign in to comment.