Skip to content

override file added to keep docker desktop option available #8

override file added to keep docker desktop option available

override file added to keep docker desktop option available #8

name: Build & Push (Compose/Bake)
on:
push:
branches: [ "main", "master" ]
jobs:
build:
runs-on: ubuntu-latest
env:
# Your Docker Hub namespace (must be lowercase)
DOCKERHUB_NS: ${{ secrets.DOCKERHUB_USERNAME }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Compute short SHA
id: sha
run: echo "short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Ensure compose files exist
run: |
test -f docker-compose.yml || (echo "missing docker-compose.yml" && exit 1)
test -f docker-compose.ci.override.yml || (echo "missing docker-compose.ci.override.yml" && exit 1)
- name: Build & Push with Bake (compose + override)
uses: docker/bake-action@v5
with:
files: |
docker-compose.yml
docker-compose.ci.override.yml
push: true
# Add extra tags for GHCR (sha) and Docker Hub (edge + sha)
set: |
*.labels=org.opencontainers.image.revision=${{ github.sha }}
usermanagementapi.tags=${{ env.DOCKERHUB_NS }}/centralized-logging/usermanagementapi:edge
usermanagementapi.tags=${{ env.DOCKERHUB_NS }}/centralized-logging/usermanagementapi:${{ steps.sha.outputs.short }}
centralizedloggingapi.tags=${{ env.DOCKERHUB_NS }}/centralized-logging/loggingapi:edge
centralizedloggingapi.tags=${{ env.DOCKERHUB_NS }}/centralized-logging/loggingapi:${{ steps.sha.outputs.short }}
apiintegrationmvc.tags=${{ env.DOCKERHUB_NS }}/centralized-logging/integrationportal:edge
apiintegrationmvc.tags=${{ env.DOCKERHUB_NS }}/centralized-logging/integrationportal:${{ steps.sha.outputs.short }}
env:
# Primary tag selected in the override (GHCR)
TAG: edge