Skip to content

Docker Image CI

Docker Image CI #78

Workflow file for this run

name: Docker Image CI
on:
schedule:
- cron: "0 11 * * 3"
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
loopcheck:
strategy:
matrix:
docker_images:
- elk
- s3
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build the Docker image
run: |
docker build ${{ matrix.docker_images }} \
--tag "corilus/cp-kafka-connect-${{ matrix.docker_images }}:latest" \
--label="org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
--label="org.opencontainers.image.revision=$GITHUB_SHA" \
--label="org.opencontainers.image.created=$(date --rfc-3339=seconds)"
- name: Login to DockerHub
if: github.ref == 'refs/heads/master'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push images to Docker Hub registry
if: github.ref == 'refs/heads/master'
run: |
docker push corilus/cp-kafka-connect-${{ matrix.docker_images }}