2020-07-19 19:37:07 +02:00
|
|
|
name: Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
env:
|
|
|
|
VERSION: latest
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
push:
|
|
|
|
name: Push
|
|
|
|
runs-on: ubuntu-latest
|
2020-12-04 03:05:20 +01:00
|
|
|
|
|
|
|
strategy:
|
2020-12-04 03:10:19 +01:00
|
|
|
fail-fast: false
|
|
|
|
|
2020-12-04 03:05:20 +01:00
|
|
|
matrix:
|
|
|
|
image:
|
|
|
|
- "alpine"
|
2020-12-07 21:01:57 +01:00
|
|
|
- "alpine-install"
|
2020-12-04 03:05:20 +01:00
|
|
|
- "java7"
|
|
|
|
- "java8"
|
|
|
|
- "java9"
|
|
|
|
- "java10"
|
|
|
|
- "java11"
|
|
|
|
- "java12"
|
|
|
|
- "java13"
|
|
|
|
- "java14"
|
2020-12-06 05:04:21 +01:00
|
|
|
- "java15"
|
2020-12-07 21:01:57 +01:00
|
|
|
- "source"
|
|
|
|
- "source-install"
|
2020-07-19 19:37:07 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Code Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-12-15 17:01:10 +01:00
|
|
|
- name: Install buildx
|
|
|
|
uses: crazy-max/ghaction-docker-buildx@v1
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
|
2020-07-19 19:37:07 +02: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
|
2020-07-19 19:37:07 +02:00
|
|
|
|
2020-12-04 03:05:20 +01:00
|
|
|
- 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:12:44 +01:00
|
|
|
docker buildx build --tag $IMAGE_ID --platform linux/amd64,linux/arm64 ./${{ matrix.image }}
|
2020-08-05 04:11:03 +02:00
|
|
|
|
2020-12-04 03:05:20 +01:00
|
|
|
- name: Push 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-08-05 04:11:03 +02:00
|
|
|
run: |
|
2020-12-15 17:11:08 +01:00
|
|
|
docker tag $IMAGE_ID $IMAGE_ID
|
|
|
|
docker push $IMAGE_ID
|