# Build DITA-OT Docker image and deploy to ghcr.io
name: Docker

on:
  workflow_dispatch:
    inputs:
      version:
        description: 'DITA-OT version'
        required: true

jobs:
  docker:
    name: Build and deploy Docker image
    runs-on: ubuntu-latest
    steps:
      - name: Log in
        run: |
          echo $PAT | docker login ghcr.io --username ditaotbot --password-stdin
        env:
          PAT: ${{ secrets.COMMITTER_TOKEN }}
      - name: Build image
        run: |
          docker build --tag ghcr.io/dita-ot/dita-ot:${VERSION} --build-arg VERSION=${VERSION} .
        env:
          VERSION: ${{ github.event.inputs.version }}
      - name: Deploy image
        run: |
          docker push ghcr.io/dita-ot/dita-ot:${VERSION}
        env:
          VERSION: ${{ github.event.inputs.version }}

# Build DITA-OT Docker image and deploy to ghcr.io
name: Docker

on:
  workflow_dispatch:
    inputs:
      version:
        description: 'DITA-OT version'
        required: true

jobs:
  docker:
    name: Build and deploy Docker image
    runs-on: ubuntu-latest
    steps:
      - name: Log in
        run: |
          echo $PAT | docker login ghcr.io --username ditaotbot --password-stdin
        env:
          PAT: ${{ secrets.PACKAGE_REGISTRY }}
      - name: Build image
        run: |
          docker build --tag ghcr.io/dita-ot/dita-ot:${VERSION} --build-arg VERSION=${VERSION} .
        env:
          VERSION: ${{ github.event.inputs.version }}
      - name: Deploy image
        run: |
          docker push ghcr.io/dita-ot/dita-ot:${VERSION}
        env:
          VERSION: ${{ github.event.inputs.version }}

Change PAT for CI Docker build
Change PAT for CI Docker build

Signed-off-by: Jarno Elovirta <0f1ab0ac7dffd9db21aa539af2fd4bb04abc3ad4@elovirta.com>
