proc-cli 1.14.3

A semantic CLI tool for process management
Documentation
name: Docker

on:
  push:
    tags:
      - 'v*'

env:
  REGISTRY: docker.io
  IMAGE_NAME: yazeed/proc-cli
  # The image's original name. Docker Hub can't rename repositories, so the
  # same build is pushed here too and existing `docker pull yazeed/proc` users
  # keep getting updates.
  LEGACY_IMAGE_NAME: yazeed/proc
  FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
  docker:
    name: Build and Push
    runs-on: ubuntu-latest
    permissions:
      contents: read

    steps:
      - uses: actions/checkout@v4

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

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

      - name: Log in to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Extract version from tag
        id: version
        run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

      - name: Build and push
        uses: docker/build-push-action@v5
        with:
          context: .
          platforms: linux/amd64,linux/arm64
          push: true
          tags: |
            ${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}
            ${{ env.IMAGE_NAME }}:latest
            ${{ env.LEGACY_IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}
            ${{ env.LEGACY_IMAGE_NAME }}:latest
          cache-from: type=gha
          cache-to: type=gha,mode=max

      - name: Update Docker Hub description
        uses: peter-evans/dockerhub-description@v4
        continue-on-error: true
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
          repository: ${{ env.IMAGE_NAME }}
          short-description: "Semantic CLI tool for process management. Target by port, PID, name or path."
          readme-filepath: ./README.md

      - name: Update Docker Hub description (original image name)
        uses: peter-evans/dockerhub-description@v4
        continue-on-error: true
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
          repository: ${{ env.LEGACY_IMAGE_NAME }}
          short-description: "Now published as yazeed/proc-cli (same image). Semantic CLI tool for process management."
          readme-filepath: ./README.md