name: local-build-release

# Intended for local network use.
# Remote access is possible if the host has a public IP address.

on:
  workflow_dispatch:

env:
  REGISTRY: ${{ vars.DOCKER_REGISTRY }}

jobs:
  local-build-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Setup Docker Buildx
        uses: docker/setup-buildx-action@v2
        with:
          config-inline: |
            [registry."${{ env.REGISTRY }}"]
              http = true
              insecure = true
      - name: Build and Push Docker Image
        uses: docker/build-push-action@v3
        with:
          context: .
          platforms: linux/amd64
          push: true
          tags: ${{ env.REGISTRY }}/jws/jws-frontend:latest
          allow: security.insecure
