56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Docker
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
VERSION: latest
|
|
|
|
jobs:
|
|
push:
|
|
name: Push
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
image:
|
|
- "alpine"
|
|
- "alpine-install"
|
|
- "java7"
|
|
- "java8"
|
|
- "java9"
|
|
- "java10"
|
|
- "java11"
|
|
- "java12"
|
|
- "java13"
|
|
- "java14"
|
|
- "java15"
|
|
#- "source"
|
|
#- "source-install"
|
|
|
|
steps:
|
|
- name: Code Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Registry Authentication
|
|
run: |
|
|
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
|
|
|
- name: Build Image
|
|
env:
|
|
IMAGE_ID: docker.pkg.github.com/${{ github.repository }}/${{ matrix.image }}:latest
|
|
run: |
|
|
docker buildx build --tag $IMAGE_ID --platform linux/amd64 ./${{ matrix.image }}
|
|
|
|
- name: Push Image
|
|
env:
|
|
IMAGE_ID: docker.pkg.github.com/${{ github.repository }}/${{ matrix.image }}:latest
|
|
run: |
|
|
docker push $IMAGE_ID
|