yolks/.github/workflows/docker-publish.yml

68 lines
1.5 KiB
YAML
Raw Normal View History

name: Docker
on:
push:
branches:
- master
jobs:
push:
name: Push
2020-12-15 17:43:25 +01:00
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
image:
- "alpine"
2020-12-15 17:48:07 +01:00
#- "alpine-install"
#- "java7"
#- "java8"
#- "java9"
#- "java10"
#- "java11"
#- "java12"
#- "java13"
#- "java14"
#- "java15"
2020-12-15 17:19:26 +01:00
#- "source"
#- "source-install"
steps:
- name: Code Checkout
uses: actions/checkout@v2
2020-12-15 17:58:56 +01:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
2020-12-15 17:01:10 +01:00
- name: Install buildx
2020-12-15 17:19:26 +01:00
uses: docker/setup-buildx-action@v1
2020-12-15 17:25:15 +01:00
with:
2020-12-15 17:26:47 +01:00
version: v0.5.1
2020-12-15 17:50:38 +01:00
buildkitd-flags: --debug
2020-12-15 17:01:10 +01:00
2020-12-15 18:10:17 +01:00
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
2020-12-15 18:25:15 +01:00
- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: matthewp
password: ${{ secrets.QUAY_SECRET }}
2020-12-15 18:15:43 +01:00
- name: Build and Push
2020-12-15 17:54:04 +01:00
uses: docker/build-push-action@v2
with:
2020-12-15 18:11:21 +01:00
context: ./${{ matrix.image }}
file: ./${{ matrix.image }}/Dockerfile
2020-12-15 18:15:43 +01:00
platforms: linux/amd64,linux/arm64
2020-12-15 18:25:15 +01:00
tags: |
ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:latest
quay.io/matthewp/${{ matrix.image }}:latest