Skip to content

ci: try enhance tagging #4

ci: try enhance tagging

ci: try enhance tagging #4

name: Build and Push Docker Image to GHCR
on:
push:
branches:
- main
- demaf
- ES-86
env:
IMAGE_URL: ghcr.io/ust-demaf
IMAGE_NAME: productcatalogservice
IMAGE_TAG: 1.11.1
jobs:
build-using-dockerfile-push-2-ghcr:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
# Set up Docker Buildx (for better cross-platform builds, optional)
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Log in to GitHub Container Registry (GHCR)
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./src/productcatalogservice/Dockerfile
platforms: linux/amd64, linux/arm64
push: true
tags: ${{ env.IMAGE_URL }}/demo:${{ env.IMAGE_TAG }}-${{ env.IMAGE_NAME }}
provenance: false