Skip to content

Update java.yml

Update java.yml #2

Workflow file for this run

name: Docker Build for Java
on:
push:
branches:
- main
paths:
- java/**
- .github/workflows/java.yml
workflow_dispatch:
schedule:
- cron: "0 0 1 * *"
jobs:
push:
name: "Build and Push Docker Images"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- 21
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
push: true
context: ./java
file: ./java/${{ matrix.tag }}/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/docker-images:java_${{ matrix.tag }}