Skip to content

Merge pull request #10 from rahulsom/renovate/docker-login-action-3.x #30

Merge pull request #10 from rahulsom/renovate/docker-login-action-3.x

Merge pull request #10 from rahulsom/renovate/docker-login-action-3.x #30

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.7
- name: Log in to the Container registry
uses: docker/login-action@v3.3.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) \
--tag ghcr.io/rahulsom/${{matrix.image}}:latest
- name: Push Image
if: github.ref == 'refs/heads/main'
working-directory: ${{matrix.image}}
run: docker push --all-tags ghcr.io/rahulsom/${{matrix.image}}