Skip to content

docker: Add docker buildx functionality to dockernode playbook for ar… #2476

docker: Add docker buildx functionality to dockernode playbook for ar…

docker: Add docker buildx functionality to dockernode playbook for ar… #2476

Workflow file for this run

name: Docker
on:
pull_request:
paths:
- .github/workflows/build.yml
- ansible/playbooks/AdoptOpenJDK_Unix_Playbook/**
- ansible/docker/**
branches:
- master
push:
paths:
- .github/workflows/build.yml
- ansible/playbooks/AdoptOpenJDK_Unix_Playbook/**
- ansible/docker/**
branches:
- master
permissions:
contents: read
jobs:
build-and-push-centos6:
name: Centos6
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Docker Buildx to use cache feature
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Login to Docker Hub
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
if: github.ref == 'refs/heads/master'
- name: Docker Build CentOS6 Image Test
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
file: ./ansible/docker/Dockerfile.CentOS6
build-args: git_sha=${{ github.sha }}
tags: adoptopenjdk/centos6_build_image:latest
cache-from: type=registry,ref=adoptopenjdk/centos6_build_image:latest
cache-to: type=inline
push: false
if: github.ref != 'refs/heads/master'
- name: Docker Build & Push Centos6 Image to Docker Hub On Merge
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
file: ./ansible/docker/Dockerfile.CentOS6
build-args: git_sha=${{ github.sha }}
tags: adoptopenjdk/centos6_build_image:latest
cache-from: type=registry,ref=adoptopenjdk/centos6_build_image:latest
cache-to: type=inline
push: false
if: github.ref == 'refs/heads/master'
build-and-push-alpine3:
name: Alpine3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Docker Buildx to use cache feature
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Docker Build Alpine3 Image
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
file: ./ansible/docker/Dockerfile.Alpine3
build-args: git_sha=${{ github.sha }}
tags: adoptopenjdk/alpine3_build_image:latest
cache-from: type=registry,ref=adoptopenjdk/alpine3_build_image:latest
cache-to: type=inline
push: false