Skip to content

feat: bump ubi8/ubi-minimal from 8.9-1029 to 8.10-1086 #11

feat: bump ubi8/ubi-minimal from 8.9-1029 to 8.10-1086

feat: bump ubi8/ubi-minimal from 8.9-1029 to 8.10-1086 #11

name: Build and Publish Docker Image
on:
push:
branches:
- "**" # Trigger on push to any branch
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log into the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract branch name
id: extract_branch
run: echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Replace slashes in branch name
id: sanitize_branch
run: |
sanitized_branch_name=$(echo "${{ env.branch_name }}" | tr '/' '-')
echo "sanitized_branch_name=$sanitized_branch_name" >> $GITHUB_ENV
- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push the Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ env.sanitized_branch_name }}-nightly