Skip to content

Create and publish CI/CD Docker image #742

Create and publish CI/CD Docker image

Create and publish CI/CD Docker image #742

Workflow file for this run

name: Create and publish CI/CD Docker image
on:
push:
tags:
- '[6-9].[0-9].[0-9]-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]_[0-9]'
env:
DOCKERHUB_IMAGE_NAME: 'exoplatform/exo'
jobs:
build-and-push-image:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKERHUB_IMAGE_NAME }}
- name: Build and push Docker image to Dockerhub
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}