Piped-Backend/.github/workflows/docker-build.yml

59 lines
1.6 KiB
YAML
Raw Normal View History

2021-01-05 05:26:43 +00:00
name: Docker Multi-Architecture Build
on:
push:
paths-ignore:
- "**.md"
branches:
- master
jobs:
2023-08-14 10:26:52 +00:00
build-jdk:
uses: ./.github/workflows/fat-build.yml
build-docker:
2023-08-14 10:26:52 +00:00
needs: build-jdk
2021-01-05 05:26:43 +00:00
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: 1337kavin/piped:openj9
dockerfile: ./Dockerfile.openj9.ci
2023-06-01 18:41:09 +00:00
- image: 1337kavin/piped:hotspot
dockerfile: ./Dockerfile.ci
2023-06-01 18:41:09 +00:00
- image: 1337kavin/piped:latest,1337kavin/piped:azul-zulu
dockerfile: ./Dockerfile.azul.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:
- uses: actions/checkout@v4
2023-08-14 10:26:52 +00:00
- 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
2021-01-05 05:26:43 +00:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
2021-01-05 05:26:43 +00:00
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
2021-01-05 05:26:43 +00:00
with:
version: latest
- name: Login to DockerHub
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
uses: docker/build-push-action@v4
2021-01-05 05:26:43 +00:00
with:
context: .
file: ${{ matrix.dockerfile }}
2021-01-05 05:26:43 +00:00
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ matrix.image }}
2022-06-02 12:22:11 +00:00
cache-from: type=gha
cache-to: type=gha,mode=max