Skip to content

.github/workflows/build-and-push.yml #27

.github/workflows/build-and-push.yml

.github/workflows/build-and-push.yml #27

on:
workflow_dispatch:
schedule:
- cron: '31 0 * * 0'
push:
branches:
- main
paths:
- 'Dockerfile-*'
- '**/build-and-push.yml'
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
docker_tag:
- debian_bookworm
- debian_bullseye
- rockylinux8
- rockylinux9
- ubuntu_20.04
- ubuntu_22.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
# context: .
file: Dockerfile-${{ matrix.docker_tag }}
push: true
tags: thoteam/molecule_apache_openjdk8:${{ matrix.docker_tag }}