Bump docker/login-action from 1.14.1 to 2.2.0 #95
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: Docker build | |
on: [push, pull_request] | |
jobs: | |
jdk11: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build | |
run: docker buildx build --tag ghcr.io/edumco/maven-alpine:jdk11 . | |
- name: Login on Container Registry | |
uses: docker/login-action@v2.2.0 | |
if: contains( ${{ github.head_ref }}, "main" ) | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.CONTAINER_REGISTRY }} | |
- name: Push image to register | |
if: contains( ${{ github.head_ref }}, "main" ) | |
run: docker push ghcr.io/edumco/maven-alpine:jdk11 | |
jdk17: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build | |
run: docker buildx build --tag ghcr.io/edumco/maven-alpine:jdk17 --build-arg JDK_IMAGE=openjdk:17-alpine . | |
- name: Login on Container Registry | |
uses: docker/login-action@v2.2.0 | |
if: contains( ${{ github.head_ref }}, "main" ) | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.CONTAINER_REGISTRY }} | |
- name: Push image to register | |
if: contains( ${{ github.head_ref }}, "main" ) | |
run: docker push ghcr.io/edumco/maven-alpine:jdk17 | |