No need to log "Downloading" even when download isn't needed (#150) #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish | |
on: | |
push: | |
branches: | |
- master | |
- test/* | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
variant: [ latest, java17, java8, java11 ] | |
include: | |
- variant: latest | |
baseImage: eclipse-temurin:17-focal | |
tagPrefix: "" | |
- variant: java17 | |
baseImage: eclipse-temurin:17-focal | |
tagPrefix: java17- | |
- variant: java8 | |
baseImage: adoptopenjdk:8-jre-hotspot-focal | |
tagPrefix: java8- | |
- variant: java11 | |
baseImage: adoptopenjdk:11-jre-hotspot-focal | |
tagPrefix: java11- | |
env: | |
DOCKER_HUB_ORG: itzg | |
steps: | |
- uses: actions/[email protected] | |
- name: Docker meta | |
id: meta | |
uses: docker/[email protected] | |
with: | |
images: | | |
${{ env.DOCKER_HUB_ORG }}/bungeecord | |
tags: | | |
type=ref,event=branch,prefix=${{ matrix.tagPrefix }} | |
type=ref,event=tag,prefix=${{ matrix.tagPrefix }} | |
type=raw,value=${{ matrix.variant }} | |
flavor: | | |
latest=false | |
- name: Setup Docker Buildx | |
uses: docker/[email protected] | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Login to DockerHub | |
if: github.event_name != 'pull_request' | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/[email protected] | |
with: | |
platforms: linux/amd64,linux/arm/v7,linux/arm64 | |
# ensure latest base image is used | |
pull: true | |
push: true | |
build-args: | | |
BASE_IMAGE=${{ matrix.baseImage }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha,scope=${{ matrix.variant }} | |
cache-to: type=gha,mode=max,scope=${{ matrix.variant }} |