aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorKevin Hoerr <kjhoerr@protonmail.com>2023-01-09 14:43:31 -0500
committerKevin J Hoerr <kjhoerr@protonmail.com>2025-08-18 11:51:28 -0400
commit8b6bf5ac9e7c80d84771c8158fe670b44c4afa15 (patch)
treeeea1985668b17d78b141087e11c90366932ef8d4 /.github
parent4bafa6f596ffbb8053fbb9feb700932f4ca14bea (diff)
downloadpantry-8b6bf5ac9e7c80d84771c8158fe670b44c4afa15.tar.gz
pantry-8b6bf5ac9e7c80d84771c8158fe670b44c4afa15.tar.bz2
pantry-8b6bf5ac9e7c80d84771c8158fe670b44c4afa15.zip
Add multistage docker file for ease of use (#41)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml14
1 files changed, 11 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index bc2337e..82188ba 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,26 +12,35 @@ jobs:
runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ image-type: [ native, multistage ]
+
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
+ if: matrix.image-type == 'native'
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
- name: Install Node.js packages
+ if: matrix.image-type == 'native'
run: yarn install
- name: Run build injection
+ if: matrix.image-type == 'native'
run: yarn inject
- name: Use Java 17
+ if: matrix.image-type == 'native'
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Maven package
+ if: matrix.image-type == 'native'
run: mvn package -Pnative -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true
- name: Setup Docker buildx
@@ -52,9 +61,8 @@ jobs:
with:
context: .
push: true
- file: src/main/docker/Dockerfile.native
- tags: ${{ steps.meta.outputs.tags }}
+ file: src/main/docker/Dockerfile.${{ matrix.image-type }}
+ tags: ${{ env.IMAGE_NAME }}:${{ matrix.image-type }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
-