name: Test Nexus (Docker)

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  test-nexus-via-docker-build:
    name: Build Nexus Docker Image
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Build ere-base image
        run: |
          docker build \
            --tag ere-base:latest \
            --file docker/base/Dockerfile.base .

      - name: Build ere-builder-nexus image
        run: |
          docker build \
            --tag ere-builder-nexus:latest \
            --file docker/nexus/Dockerfile .
