wof 1.0.0

The Who's On First rust library and command line.
Documentation
name: Push on docker hub

on:
  push:
    tags: [ '*' ]
    branches: [ main, master ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Major tag
      if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
      id: major-tag
      run: echo "::set-output name=tag::$(git describe --tags | grep -o '^[0-9]*')"
    - name: Minor tag
      if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
      id: minor-tag
      run: echo "::set-output name=tag::$(git describe --tags | grep -o '^[0-9]*\.[0-9]*')"
    - name: Patch tag
      if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
      id: patch-tag
      run: echo "::set-output name=tag::$(git describe --tags | grep -o '^[0-9]*\.[0-9]*\.[0-9]*')"
    - name: Set up QEMU
      uses: docker/setup-qemu-action@v3
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v3
    - name: Login to DockerHub
      uses: docker/login-action@v3
      with:
        username: ${{ secrets.DOCKERHUB_USERNAME }}
        password: ${{ secrets.DOCKERHUB_TOKEN }}
    - name: Build image latest/tag and push
      if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master'
      uses: docker/build-push-action@v6
      with:
        context: .
        file: ./Dockerfile
        platforms: linux/386,linux/amd64,linux/arm64
        push: true
        tags: |
          joxit/wof:latest
          joxit/wof:${{steps.major-tag.outputs.tag}}
          joxit/wof:${{steps.minor-tag.outputs.tag}}
          joxit/wof:${{steps.patch-tag.outputs.tag}}
    - name: Build image main and push
      if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
      uses: docker/build-push-action@v6
      with:
        context: .
        file: ./Dockerfile
        platforms: linux/386,linux/amd64,linux/arm64
        push: true
        tags: |
          joxit/wof:main
          joxit/wof:master