-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from jmesnil/temurin
Build JDK 11, 17 & 19 images using GitHub action
- Loading branch information
Showing
3 changed files
with
64 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,58 @@ | ||
name: publish-release | ||
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: | ||
push: | ||
tags: | ||
- "*.Final*" | ||
- "*" | ||
|
||
jobs: | ||
image: | ||
strategy: | ||
matrix: | ||
jdk-version: [11, 17, 19] | ||
env: | ||
# Put the "latest" tag on this JDK version | ||
JDK_VERSION_FOR_LATEST: 17 | ||
environment: quay.io | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
uses: docker/metadata-action@v4.1.1 | ||
with: | ||
images: ${{ secrets.REGISTRY }}/${{ secrets.IMAGE }} | ||
tags: type=ref,event=tag | ||
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@v1.2.0 | ||
uses: docker/setup-qemu-action@v2.1.0 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v2.2.1 | ||
- name: Docker Login to Quay.io | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v2.1.0 | ||
with: | ||
registry: ${{ secrets.REGISTRY }} | ||
username: ${{ secrets.REGISTRY_USER }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
- name: Build and push | ||
- name: Build and push JDK images | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v3.2.0 | ||
with: | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
build-args: jdk=${{ matrix.jdk-version }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }},latest | ||
labels: ${{ steps.meta.outputs.labels }} |
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
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