Skip to content

chore: Publish docker image #15

chore: Publish docker image

chore: Publish docker image #15

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
image:
- ack
- all-jdks
- careercup
- logstash
- pcat
- quincykit
- rubygems-servlets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.3
- name: Log in to the Container registry
uses: docker/login-action@v3.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image
working-directory: ${{matrix.image}}
run: docker build . --file Dockerfile --tag ghcr.io/rahulsom/${{matrix.image}}:$(date +%s)
- name: Push Image
if: github.ref == 'refs/heads/main'
working-directory: ${{matrix.image}}
run: docker push --all-tags ghcr.io/rahulsom/${{matrix.image}}