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