Skip to content

Build and push WildFly Docker images #3

Build and push WildFly Docker images

Build and push WildFly Docker images #3

name: Build and push WildFly Docker images
# This action requires 4 secrets:
# secrets.REGISTRY - the container registry (e.g. quay.io)
# secrets.IMAGE - the namespaced name of the image (e.g. wildfly/wildfly)
# secrets.REGISTRY_USER - the user name to authentication before pushing the image
# secrets.REGISTRY_PASSWORD - the user password to authentication before pushing the image
on:
workflow_dispatch:
jobs:
image:
env:
# Put the "latest" tag on this JDK version
JDK_VERSION_FOR_LATEST: 21
strategy:
matrix:
include:
- jdk-version: 11
dist: centos7
platforms: linux/amd64,linux/arm64,linux/ppc64le
- jdk-version: 17
dist: centos7
platforms: linux/amd64,linux/arm64,linux/ppc64le
- jdk-version: 21
dist: ubi9-minimal
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
environment: quay.io
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4.1.4
#- name: Docker meta
# id: meta
# uses: docker/metadata-action@v5.5.1
# with:
# images: ${{ secrets.REGISTRY }}/${{ secrets.IMAGE }}
# flavor: |
# latest=false
# tags: |
# type=ref,event=tag,suffix=-jdk${{ matrix.jdk-version }}
# type=raw,value=latest,suffix=-jdk${{ matrix.jdk-version }}
# type=raw,value=latest,enable=${{ matrix.jdk-version == env.JDK_VERSION_FOR_LATEST }}
# labels: |
# org.opencontainers.image.jdk-version=${{ matrix.jdk-version }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.3.0
#- name: Docker Login to Quay.io
# uses: docker/login-action@v3.1.0
# with:
# registry: ${{ secrets.REGISTRY }}
# username: ${{ secrets.REGISTRY_USER }}
# password: ${{ secrets.REGISTRY_PASSWORD }}
#- name: Build and push JDK images
# id: docker_build
# uses: docker/build-push-action@v5.3.0
# with:
# push: true
# platforms: ${{ matrix.platforms }}
# build-args: |
# jdk=${{ matrix.jdk-version }}
# dist=${{ matrix.dist }}
# tags: testing
# #labels: ${{ steps.meta.outputs.labels }}
- name: Build the Docker image
id: docker_build
run: docker build . --file ${{github.workspace}}/Dockerfile --tag testing:testing
- name: Upload to artifacts
uses: actions/upload-artifact@v4
with:
name: base-image
path: jobs.docker_build.outputs
retention-days: 1