name: Docker Publish Private on: workflow_call: inputs: repository: required: true type: string ref: required: true type: string image_name: required: true type: string file: required: false type: string default: 'Dockerfile' platforms: required: false type: string default: 'linux/amd64' secrets: [] jobs: docker: runs-on: ubuntu-22.04 steps: - name: Checkout Code to Build uses: actions/checkout@v4 with: repository: ${{ inputs.repository }} ref: ${{ inputs.ref }} token: ${{ github.token }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v6 with: images: 192.168.1.150:9120/${{ inputs.image_name }} - name: Build and push Docker image uses: docker/build-push-action@v6 with: context: . file: ${{ inputs.file }} platforms: ${{ inputs.platforms }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}