Skip to content

docker: add action to deploy windows build image #2662

docker: add action to deploy windows build image

docker: add action to deploy windows build image #2662

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
# Cancel existing runs if user makes another push.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
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@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.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@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.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@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
- name: Docker Build Alpine3 Image
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.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