2021-01-05 05:26:43 +00:00
|
|
|
name: Docker Multi-Architecture Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2022-09-10 20:34:31 +00:00
|
|
|
build-docker:
|
2021-01-05 05:26:43 +00:00
|
|
|
runs-on: ubuntu-latest
|
2022-09-10 20:34:31 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
2023-03-13 00:18:43 +00:00
|
|
|
- image: 1337kavin/piped:openj9
|
2022-09-10 20:34:31 +00:00
|
|
|
dockerfile: ./Dockerfile.openj9.ci
|
2023-03-13 00:18:43 +00:00
|
|
|
- image: 1337kavin/piped:latest,1337kavin/piped:hotspot
|
2022-09-10 20:34:31 +00:00
|
|
|
dockerfile: ./Dockerfile.ci
|
2023-04-27 12:05:05 +00:00
|
|
|
- image: 1337kavin/piped:graalvm-jvm
|
|
|
|
dockerfile: ./Dockerfile.graalvm-jvm.ci
|
2021-01-05 05:26:43 +00:00
|
|
|
steps:
|
2022-03-02 13:08:41 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-22 09:16:45 +00:00
|
|
|
- name: Create Version File
|
|
|
|
run: echo $(git log -1 --date=short --pretty=format:%cd)-$(git rev-parse --short HEAD) > VERSION
|
2023-04-27 12:05:05 +00:00
|
|
|
- name: set up JDK 17
|
2022-09-10 20:34:31 +00:00
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
2023-04-27 12:05:05 +00:00
|
|
|
java-version: 17
|
2022-09-10 20:34:31 +00:00
|
|
|
distribution: temurin
|
|
|
|
cache: "gradle"
|
|
|
|
- name: Run Build
|
2022-09-10 20:47:14 +00:00
|
|
|
run: ./gradlew shadowJar
|
|
|
|
- run: mv build/libs/piped-*-all.jar piped.jar
|
2021-01-05 05:26:43 +00:00
|
|
|
- name: Set up QEMU
|
2022-09-10 20:34:31 +00:00
|
|
|
uses: docker/setup-qemu-action@v2
|
2021-01-05 05:26:43 +00:00
|
|
|
with:
|
|
|
|
platforms: all
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2022-09-10 20:34:31 +00:00
|
|
|
uses: docker/setup-buildx-action@v2
|
2021-01-05 05:26:43 +00:00
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
- name: Login to DockerHub
|
2022-09-10 20:34:31 +00:00
|
|
|
uses: docker/login-action@v2
|
2021-01-05 05:26:43 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and push
|
2023-01-30 21:18:44 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2021-01-05 05:26:43 +00:00
|
|
|
with:
|
|
|
|
context: .
|
2022-09-10 20:34:31 +00:00
|
|
|
file: ${{ matrix.dockerfile }}
|
2021-01-05 05:26:43 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: true
|
2022-09-10 20:34:31 +00:00
|
|
|
tags: ${{ matrix.image }}
|
2022-06-02 12:22:11 +00:00
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|