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

50 lines
1.1 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: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:01:10 +01:00
- name: Registry Authentication
2020-12-15 17:04:56 +01:00
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Build Image
2020-12-15 17:04:56 +01:00
env:
2020-12-15 17:11:08 +01:00
IMAGE_ID: docker.pkg.github.com/${{ github.repository }}/${{ matrix.image }}:latest
2020-12-15 17:04:56 +01:00
run: |
2020-12-15 17:43:25 +01:00
docker buildx build --push --platform=linux/amd64 --tag=$IMAGE_ID ./${{ matrix.image }}